Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
9591d7d
#882 jdp-2025-06: Schema Support
mrotteveel Jun 18, 2025
9865b6b
#882 Fix tests failing due to Firebird 6 schemas
mrotteveel Jun 18, 2025
a3c5979
#882 Implement to DatabaseMetaData.getSchemas return schemas
mrotteveel Jun 19, 2025
7deb6ed
#882 Implement DatabaseMetaData informational methods to report schem…
mrotteveel Jun 19, 2025
740ce4d
Use isNullOrEmpty
mrotteveel Jun 19, 2025
286eea0
#882 Schema support for DatabaseMetaData.getProcedures
mrotteveel Jun 19, 2025
44cccc2
#882 Use SYSTEM unquoted due to dialect 1 support
mrotteveel Jun 19, 2025
d34af61
#882 Schema support for getBestRowIdentifier
mrotteveel Jun 21, 2025
05edd2d
#882 Schema support for getColumnPrivileges
mrotteveel Jun 21, 2025
7699234
#882 Schema support for getColumns
mrotteveel Jun 21, 2025
1d30a6d
#882 Schema support for getImportedKeys/getExportedKeys/getCrossRefer…
mrotteveel Jun 21, 2025
69effeb
#882 Schema support for getFunctionColumns
mrotteveel Jun 22, 2025
a5d8434
#882 Schema support for getFunctions
mrotteveel Jun 22, 2025
c08df8b
#882 Schema support for getIndexInfo
mrotteveel Jun 22, 2025
a1655eb
#882 Schema support for getPrimaryKeys
mrotteveel Jun 22, 2025
6b55727
#882 Schema support for getProcedureColumns
mrotteveel Jun 22, 2025
584e2cc
#882 Schema support for getPseudoColumns
mrotteveel Jun 22, 2025
6bdb4bc
#882 Schema support for getTablePrivileges
mrotteveel Jun 23, 2025
73ebef5
#882 Schema support for getTables
mrotteveel Jun 23, 2025
90ce855
#882 Schema support for getCatalogs
mrotteveel Jun 23, 2025
11349a7
Mark metadata classes sealed or final
mrotteveel Jun 23, 2025
ea0a273
#882 Schema support for getXXXSourceCode
mrotteveel Jun 23, 2025
b60c7d6
Add ifSchemaElse also to FirebirdSupportInfo
mrotteveel Jun 23, 2025
a154551
#882 Client props, xid detection
mrotteveel Jun 24, 2025
18a5228
#882 Retrieve schema name in column information
mrotteveel Jun 24, 2025
bed0828
#882 Incomplete change to selectable procedure detection
mrotteveel Jun 24, 2025
ce3abcc
#882 Misc wording of jdp-2025-06
mrotteveel Jun 24, 2025
d365d92
#882 Define connection property searchPath
mrotteveel Jun 24, 2025
276d8bc
Add supportInfoFor(FirebirdConnection) to avoid wrapper check
mrotteveel Jun 25, 2025
501eb78
Tighten up StoredProcedureMetaData, use support info
mrotteveel Jun 25, 2025
ca102d2
#882 Implement Connection.get/setSchema
mrotteveel Jul 9, 2025
6a7b308
#882 Additional schema tests for FBResultSetMetaData
mrotteveel Jul 12, 2025
aa3d585
#882 Modify FBRowUpdater to search for schema
mrotteveel Jul 13, 2025
1f839f0
Deduplicate strings in StatementInfoProcessor
mrotteveel Jul 13, 2025
fbff0a6
Add some todo for later
mrotteveel Jul 14, 2025
10ed654
#882 Improve schema test coverage
mrotteveel Jul 17, 2025
3662432
#882 Improve schema test coverage (getFunctions)
mrotteveel Jul 17, 2025
b83f275
Replace QualifiedName with ObjectReference
mrotteveel Jul 18, 2025
2cb017e
Add schema support assumption to test
mrotteveel Jul 18, 2025
b8769ad
#882 Improve schema test coverage (getProcedures/getProcedureColumns)
mrotteveel Jul 22, 2025
099a4b2
#882 Improve schema test coverage (getIndexInfo/getPrimaryKeys)
mrotteveel Jul 22, 2025
6a9febc
#882 Improve schema test coverage (getPseudoColumns/getTables)
mrotteveel Jul 22, 2025
48f4b7c
#882 Improve schema test coverage (getTablePrivileges)
mrotteveel Jul 22, 2025
24478cf
#882 schema support for generated keys
mrotteveel Jul 29, 2025
d251d84
#882 Add schema support for FBCallableStatement
mrotteveel Oct 9, 2025
82aa541
Fix test failure on Firebird 5 and older
mrotteveel Oct 9, 2025
a7542c0
#882 Document decision not to backport schema support to Jaybird 6
mrotteveel Oct 11, 2025
04523d7
Misc. copy editing and fixing typos
mrotteveel Oct 11, 2025
381b792
#882 Add JB_PROCEDURE_SOURCE column to getProcedures
mrotteveel Oct 13, 2025
102a856
#882 Reject idea to add column with schemas to getCatalogs
mrotteveel Oct 13, 2025
567cdea
Remove unnecessary caching from BasicVersion
mrotteveel Oct 17, 2025
e2e4e87
#882 Schema support for StatisticsManager.getTableStatistics
mrotteveel Oct 17, 2025
2353b24
#882 Schema support for FBTableStatisticsManager
mrotteveel Oct 18, 2025
c2320ed
Fixed wrong name
mrotteveel Oct 19, 2025
180999c
#882 Added setters to FirebirdConnection to set search path
mrotteveel Oct 19, 2025
d934271
Document compatibility issue with schema(Pattern) in dbmd
mrotteveel Oct 25, 2025
a35a3a0
Correct documentation of getXXXSourceCode methods
mrotteveel Oct 30, 2025
48514d5
Misc review changes
mrotteveel Oct 30, 2025
13e38c3
Use Collection instead of List, use common code path
mrotteveel Nov 3, 2025
4a83dec
Simplify version string creation in GDSServerVersion
mrotteveel Nov 3, 2025
ec1056e
SPECIFIC_NAME should not include the schema
mrotteveel Nov 3, 2025
0c9efec
Update error codes and messages from 6.0.0.1338
mrotteveel Nov 4, 2025
e37afa1
Ignore drop schema failure, refactor to single code path
mrotteveel Nov 4, 2025
588a017
Finalize jdp-2025-06
mrotteveel Nov 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#882 Schema support for getFunctions
  • Loading branch information
mrotteveel committed Oct 25, 2025
commit a5d8434595cb55d70e2f01be4e7842ec4206889c
2 changes: 1 addition & 1 deletion src/main/org/firebirdsql/jdbc/FBDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@ public ResultSet getFunctionColumns(String catalog, String schemaPattern, String
@Override
public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern)
throws SQLException {
return GetFunctions.create(getDbMetadataMediator()).getFunctions(catalog, functionNamePattern);
return GetFunctions.create(getDbMetadataMediator()).getFunctions(catalog, schemaPattern, functionNamePattern);
}

@Override
Expand Down
146 changes: 126 additions & 20 deletions src/main/org/firebirdsql/jdbc/metadata/GetFunctions.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2001-2024 Firebird development team and individual contributors
// SPDX-FileCopyrightText: Copyright 2019-2024 Mark Rotteveel
// SPDX-FileCopyrightText: Copyright 2001-2025 Firebird development team and individual contributors
// SPDX-FileCopyrightText: Copyright 2019-2025 Mark Rotteveel
// SPDX-License-Identifier: LGPL-2.1-or-later
package org.firebirdsql.jdbc.metadata;

Expand All @@ -13,6 +13,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import static java.sql.DatabaseMetaData.functionNoTable;
import static org.firebirdsql.gds.ISCConstants.SQL_SHORT;
Expand All @@ -30,8 +31,10 @@
public abstract class GetFunctions extends AbstractMetadataMethod {

private static final String FUNCTIONS = "FUNCTIONS";
private static final String COLUMN_CATALOG_NAME = "RDB$PACKAGE_NAME";
private static final String COLUMN_SCHEMA_NAME = "RDB$SCHEMA_NAME";
private static final String COLUMN_FUNCTION_NAME = "RDB$FUNCTION_NAME";

private static final RowDescriptor ROW_DESCRIPTOR = DbMetadataMediator.newRowDescriptorBuilder(11)
.at(0).simple(SQL_VARYING | 1, OBJECT_NAME_LENGTH, "FUNCTION_CAT", FUNCTIONS).addField()
.at(1).simple(SQL_VARYING | 1, OBJECT_NAME_LENGTH, "FUNCTION_SCHEM", FUNCTIONS).addField()
Expand All @@ -56,27 +59,29 @@ private GetFunctions(DbMetadataMediator mediator) {
/**
* @see java.sql.DatabaseMetaData#getFunctions(String, String, String)
*/
public final ResultSet getFunctions(String catalog, String functionNamePattern) throws SQLException {
public final ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern)
throws SQLException {
if ("".equals(functionNamePattern)) {
// Matching function name not possible
return createEmpty();
}

MetadataQuery metadataQuery = createGetFunctionsQuery(catalog, functionNamePattern);
MetadataQuery metadataQuery = createGetFunctionsQuery(catalog, schemaPattern, functionNamePattern);
return createMetaDataResultSet(metadataQuery);
}

@Override
final RowValue createMetadataRow(ResultSet rs, RowValueBuilder valueBuilder) throws SQLException {
String catalog = rs.getString("FUNCTION_CAT");
String schema = rs.getString("FUNCTION_SCHEM");
String functionName = rs.getString("FUNCTION_NAME");
return valueBuilder
.at(0).setString(catalog)
.at(1).set(null)
.at(1).setString(schema)
.at(2).setString(functionName)
.at(3).setString(rs.getString("REMARKS"))
.at(4).setShort(functionNoTable)
.at(5).setString(toSpecificName(catalog, functionName))
.at(5).setString(toSpecificName(catalog, schema, functionName))
.at(6).setString(rs.getString("JB_FUNCTION_SOURCE"))
.at(7).setString(rs.getString("JB_FUNCTION_KIND"))
.at(8).setString(rs.getString("JB_MODULE_NAME"))
Expand All @@ -85,7 +90,7 @@ final RowValue createMetadataRow(ResultSet rs, RowValueBuilder valueBuilder) thr
.toRowValue(false);
}

abstract MetadataQuery createGetFunctionsQuery(String catalog, String functionNamePattern);
abstract MetadataQuery createGetFunctionsQuery(String catalog, String schemaPattern, String functionNamePattern);

/**
* Creates an instance of {@code GetFunctions}.
Expand All @@ -97,7 +102,12 @@ final RowValue createMetadataRow(ResultSet rs, RowValueBuilder valueBuilder) thr
public static GetFunctions create(DbMetadataMediator mediator) {
FirebirdSupportInfo firebirdSupportInfo = mediator.getFirebirdSupportInfo();
// NOTE: Indirection through static method prevents unnecessary classloading
if (firebirdSupportInfo.isVersionEqualOrAbove(3)) {
if (firebirdSupportInfo.isVersionEqualOrAbove(6)) {
if (mediator.isUseCatalogAsPackage()) {
return FB6CatalogAsPackage.createInstance(mediator);
}
return FB6.createInstance(mediator);
} else if (firebirdSupportInfo.isVersionEqualOrAbove(3)) {
if (mediator.isUseCatalogAsPackage()) {
return FB3CatalogAsPackage.createInstance(mediator);
}
Expand All @@ -115,7 +125,8 @@ private static final class FB2_5 extends GetFunctions {

private static final String GET_FUNCTIONS_FRAGMENT_2_5 = """
select
null as FUNCTION_CAT,
cast(null as char(1)) as FUNCTION_CAT,
cast(null as char(1)) as FUNCTION_SCHEM,
RDB$FUNCTION_NAME as FUNCTION_NAME,
RDB$DESCRIPTION as REMARKS,
cast(null as blob sub_type text) as JB_FUNCTION_SOURCE,
Expand All @@ -137,7 +148,7 @@ private static GetFunctions createInstance(DbMetadataMediator mediator) {
}

@Override
MetadataQuery createGetFunctionsQuery(String catalog, String functionNamePattern) {
MetadataQuery createGetFunctionsQuery(String catalog, String schemaPattern, String functionNamePattern) {
Clause functionNameClause = new Clause(COLUMN_FUNCTION_NAME, functionNamePattern);
String queryText = GET_FUNCTIONS_FRAGMENT_2_5
+ functionNameClause.getCondition("\nwhere ", "")
Expand All @@ -154,6 +165,7 @@ private static final class FB3 extends GetFunctions {
private static final String GET_FUNCTIONS_FRAGMENT_3 = """
select
null as FUNCTION_CAT,
null as FUNCTION_SCHEM,
trim(trailing from RDB$FUNCTION_NAME) as FUNCTION_NAME,
RDB$DESCRIPTION as REMARKS,
RDB$FUNCTION_SOURCE as JB_FUNCTION_SOURCE,
Expand All @@ -180,7 +192,7 @@ private static GetFunctions createInstance(DbMetadataMediator mediator) {
}

@Override
MetadataQuery createGetFunctionsQuery(String catalog, String functionNamePattern) {
MetadataQuery createGetFunctionsQuery(String catalog, String schemaPattern, String functionNamePattern) {
Clause functionNameClause = new Clause(COLUMN_FUNCTION_NAME, functionNamePattern);
String queryText = GET_FUNCTIONS_FRAGMENT_3
+ functionNameClause.getCondition("\nand ", "")
Expand All @@ -194,6 +206,7 @@ private static final class FB3CatalogAsPackage extends GetFunctions {
private static final String GET_FUNCTIONS_FRAGMENT_3_W_PKG = """
select
coalesce(trim(trailing from RDB$PACKAGE_NAME), '') as FUNCTION_CAT,
null as FUNCTION_SCHEM,
trim(trailing from RDB$FUNCTION_NAME) as FUNCTION_NAME,
RDB$DESCRIPTION as REMARKS,
RDB$FUNCTION_SOURCE as JB_FUNCTION_SOURCE,
Expand All @@ -210,8 +223,6 @@ private static final class FB3CatalogAsPackage extends GetFunctions {
private static final String GET_FUNCTIONS_ORDER_BY_3_W_PKG =
"\norder by RDB$PACKAGE_NAME nulls first, RDB$FUNCTION_NAME";

private static final String COLUMN_CATALOG_NAME = "RDB$PACKAGE_NAME";

private FB3CatalogAsPackage(DbMetadataMediator mediator) {
super(mediator);
}
Expand All @@ -221,7 +232,7 @@ private static GetFunctions createInstance(DbMetadataMediator mediator) {
}

@Override
MetadataQuery createGetFunctionsQuery(String catalog, String functionNamePattern) {
MetadataQuery createGetFunctionsQuery(String catalog, String schemaPattern, String functionNamePattern) {
var clauses = new ArrayList<Clause>(2);
if (catalog != null) {
// To quote from the JDBC API: "" retrieves those without a catalog; null means that the catalog name
Expand All @@ -234,14 +245,109 @@ MetadataQuery createGetFunctionsQuery(String catalog, String functionNamePattern
}
}
clauses.add(new Clause(COLUMN_FUNCTION_NAME, functionNamePattern));
//@formatter:off
String sql = GET_FUNCTIONS_FRAGMENT_3_W_PKG
+ (Clause.anyCondition(clauses)
? "\nwhere " + Clause.conjunction(clauses)
: "")
+ (Clause.anyCondition(clauses) ? "\nwhere " + Clause.conjunction(clauses) : "")
+ GET_FUNCTIONS_ORDER_BY_3_W_PKG;
//@formatter:on
return new MetadataQuery(sql, Clause.parameters(clauses));
}
}

private static final class FB6 extends GetFunctions {

private static final String GET_FUNCTIONS_FRAGMENT_6 = """
select
null as FUNCTION_CAT,
trim(trailing from RDB$SCHEMA_NAME) as FUNCTION_SCHEM,
trim(trailing from RDB$FUNCTION_NAME) as FUNCTION_NAME,
RDB$DESCRIPTION as REMARKS,
RDB$FUNCTION_SOURCE as JB_FUNCTION_SOURCE,
case
when RDB$LEGACY_FLAG = 1 then 'UDF'
when RDB$ENGINE_NAME is not null then 'UDR'
else 'PSQL'
end as JB_FUNCTION_KIND,
trim(trailing from RDB$MODULE_NAME) as JB_MODULE_NAME,
trim(trailing from RDB$ENTRYPOINT) as JB_ENTRYPOINT,
trim(trailing from RDB$ENGINE_NAME) as JB_ENGINE_NAME
from SYSTEM.RDB$FUNCTIONS
where RDB$PACKAGE_NAME is null""";

// NOTE: Including RDB$PACKAGE_NAME so index can be used to sort
private static final String GET_FUNCTIONS_ORDER_BY_6 =
"\norder by RDB$SCHEMA_NAME, RDB$PACKAGE_NAME, RDB$FUNCTION_NAME";

private FB6(DbMetadataMediator mediator) {
super(mediator);
}

private static GetFunctions createInstance(DbMetadataMediator mediator) {
return new FB6(mediator);
}

@Override
MetadataQuery createGetFunctionsQuery(String catalog, String schemaPattern, String functionNamePattern) {
var clauses = List.of(
new Clause(COLUMN_SCHEMA_NAME, schemaPattern),
new Clause(COLUMN_FUNCTION_NAME, functionNamePattern));
String queryText = GET_FUNCTIONS_FRAGMENT_6
+ (Clause.anyCondition(clauses) ? "\nand " + Clause.conjunction(clauses) : "")
+ GET_FUNCTIONS_ORDER_BY_6;
return new MetadataQuery(queryText, Clause.parameters(clauses));
}

}

private static final class FB6CatalogAsPackage extends GetFunctions {

private static final String GET_FUNCTIONS_FRAGMENT_6_W_PKG = """
select
coalesce(trim(trailing from RDB$PACKAGE_NAME), '') as FUNCTION_CAT,
trim(trailing from RDB$SCHEMA_NAME) as FUNCTION_SCHEM,
trim(trailing from RDB$FUNCTION_NAME) as FUNCTION_NAME,
RDB$DESCRIPTION as REMARKS,
RDB$FUNCTION_SOURCE as JB_FUNCTION_SOURCE,
case
when RDB$LEGACY_FLAG = 1 then 'UDF'
when RDB$ENGINE_NAME is not null then 'UDR'
else 'PSQL'
end as JB_FUNCTION_KIND,
trim(trailing from RDB$MODULE_NAME) as JB_MODULE_NAME,
trim(trailing from RDB$ENTRYPOINT) as JB_ENTRYPOINT,
trim(trailing from RDB$ENGINE_NAME) as JB_ENGINE_NAME
from SYSTEM.RDB$FUNCTIONS""";

private static final String GET_FUNCTIONS_ORDER_BY_6_W_PKG =
"\norder by RDB$PACKAGE_NAME nulls first, RDB$SCHEMA_NAME, RDB$FUNCTION_NAME";

private FB6CatalogAsPackage(DbMetadataMediator mediator) {
super(mediator);
}

private static GetFunctions createInstance(DbMetadataMediator mediator) {
return new FB6CatalogAsPackage(mediator);
}

@Override
MetadataQuery createGetFunctionsQuery(String catalog, String schemaPattern, String functionNamePattern) {
var clauses = new ArrayList<Clause>(3);
clauses.add(new Clause(COLUMN_SCHEMA_NAME, schemaPattern));
if (catalog != null) {
// To quote from the JDBC API: "" retrieves those without a catalog; null means that the catalog name
// should not be used to narrow the search
if (catalog.isEmpty()) {
clauses.add(Clause.isNullClause(COLUMN_CATALOG_NAME));
} else {
// Exact matches only
clauses.add(Clause.equalsClause(COLUMN_CATALOG_NAME, catalog));
}
}
clauses.add(new Clause(COLUMN_FUNCTION_NAME, functionNamePattern));
String sql = GET_FUNCTIONS_FRAGMENT_6_W_PKG
+ (Clause.anyCondition(clauses) ? "\nwhere " + Clause.conjunction(clauses) : "")
+ GET_FUNCTIONS_ORDER_BY_6_W_PKG;
return new MetadataQuery(sql, Clause.parameters(clauses));
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
*/
class FBDatabaseMetaDataFunctionColumnsTest {

// TODO Add schema support: tests involving other schema

private static final String PSQL_EXAMPLE_1 = "PSQL$EXAMPLE$1";
private static final String PSQL_EXAMPLE_2 = "PSQL$EXAMPLE$2";
private static final String UDF_EXAMPLE_1 = "UDF$EXAMPLE$1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import static org.firebirdsql.common.FBTestProperties.getDefaultPropertiesForConnection;
import static org.firebirdsql.common.FBTestProperties.getDefaultSupportInfo;
import static org.firebirdsql.common.FBTestProperties.getUrl;
import static org.firebirdsql.common.FBTestProperties.ifSchemaElse;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
Expand All @@ -36,6 +37,8 @@
*/
class FBDatabaseMetaDataFunctionsTest {

// TODO Add schema support: tests involving other schema

private static final String CREATE_UDF_EXAMPLE = """
declare external function UDF$EXAMPLE
int by descriptor, int by descriptor
Expand Down Expand Up @@ -274,7 +277,7 @@ private void validatePsqlExample(ResultSet functions, boolean useCatalogAsPackag
rules.put(FunctionMetaData.FUNCTION_CAT, "");
}
rules.put(FunctionMetaData.FUNCTION_NAME, "PSQL$EXAMPLE");
rules.put(FunctionMetaData.SPECIFIC_NAME, "PSQL$EXAMPLE");
rules.put(FunctionMetaData.SPECIFIC_NAME, ifSchemaElse("\"PUBLIC\".\"PSQL$EXAMPLE\"", "PSQL$EXAMPLE"));
if (supportsComments) {
rules.put(FunctionMetaData.REMARKS, "Comment on PSQL$EXAMPLE");
}
Expand All @@ -298,7 +301,7 @@ private void validateUdfExample(ResultSet functions, boolean useCatalogAsPackage
rules.put(FunctionMetaData.FUNCTION_CAT, "");
}
rules.put(FunctionMetaData.FUNCTION_NAME, "UDF$EXAMPLE");
rules.put(FunctionMetaData.SPECIFIC_NAME, "UDF$EXAMPLE");
rules.put(FunctionMetaData.SPECIFIC_NAME, ifSchemaElse("\"PUBLIC\".\"UDF$EXAMPLE\"", "UDF$EXAMPLE"));
if (supportsComments) {
rules.put(FunctionMetaData.REMARKS, "Comment on UDF$EXAMPLE");
}
Expand All @@ -312,7 +315,7 @@ private void validatePackageFunctionExample(ResultSet functions) throws SQLExcep
Map<FunctionMetaData, Object> rules = getDefaultValidationRules();
rules.put(FunctionMetaData.FUNCTION_CAT, "WITH$FUNCTION");
rules.put(FunctionMetaData.FUNCTION_NAME, "IN$PACKAGE");
rules.put(FunctionMetaData.SPECIFIC_NAME, "\"WITH$FUNCTION\".\"IN$PACKAGE\"");
rules.put(FunctionMetaData.SPECIFIC_NAME, ifSchemaElse("\"PUBLIC\".", "") + "\"WITH$FUNCTION\".\"IN$PACKAGE\"");
// Stored with package
rules.put(FunctionMetaData.JB_FUNCTION_SOURCE, null);
rules.put(FunctionMetaData.JB_FUNCTION_KIND, "PSQL");
Expand Down Expand Up @@ -351,7 +354,7 @@ class Ignored {
static {
Map<FunctionMetaData, Object> defaults = new EnumMap<>(FunctionMetaData.class);
defaults.put(FunctionMetaData.FUNCTION_CAT, null);
defaults.put(FunctionMetaData.FUNCTION_SCHEM, null);
defaults.put(FunctionMetaData.FUNCTION_SCHEM, ifSchemaElse("PUBLIC", null));
defaults.put(FunctionMetaData.REMARKS, null);
defaults.put(FunctionMetaData.FUNCTION_TYPE, (short) DatabaseMetaData.functionNoTable);
defaults.put(FunctionMetaData.JB_FUNCTION_SOURCE, null);
Expand Down