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
SPECIFIC_NAME should not include the schema
  • Loading branch information
mrotteveel committed Nov 3, 2025
commit ec1056e480ad5b49990ebdb070d24683860a8dd6
5 changes: 2 additions & 3 deletions src/main/org/firebirdsql/jdbc/FBDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -1211,9 +1211,8 @@ public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
* <li>Column {@code PROCEDURE_CAT} for normal procedures is empty string ({@code ""}) instead of {@code null},
* for packaged procedures it is the package name</li>
* <li>Column {@code SPECIFIC_NAME} for packaged procedures will report
* {@code [<quoted-schema-name>.]<quoted-package-name>.<quoted-procedure-name>} (on Firebird 5.0 and older, normal
* procedures will report the same as column {@code PROCEDURE_NAME}, the unquoted name, on Firebird 6.0 and higher,
* {@code <quoted-schema-name>.<quoted-procedure-name>})</li>
* {@code <quoted-package-name>.<quoted-procedure-name>} (normal procedures will report the same as column
* {@code PROCEDURE_NAME}, the unquoted name)</li>
* </ul>
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ final RowValue createMetadataRow(ResultSet rs, RowValueBuilder valueBuilder) thr
.at(13).setInt(typeMetadata.getCharOctetLength())
.at(14).setInt(ordinalPosition)
.at(15).setString(nullable ? "YES" : "NO")
.at(16).setString(toSpecificName(catalog, schema, functionName))
.at(16).setString(toSpecificName(catalog, functionName))
.toRowValue(false);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/org/firebirdsql/jdbc/metadata/GetFunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ final RowValue createMetadataRow(ResultSet rs, RowValueBuilder valueBuilder) thr
.at(2).setString(functionName)
.at(3).setString(rs.getString("REMARKS"))
.at(4).setShort(functionNoTable)
.at(5).setString(toSpecificName(catalog, schema, functionName))
.at(5).setString(toSpecificName(catalog, 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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ final RowValue createMetadataRow(ResultSet rs, RowValueBuilder valueBuilder) thr
.at(17).setInt(rs.getInt("PARAMETER_NUMBER"))
// TODO: Find out if there is a conceptual difference with NULLABLE (idx 11)
.at(18).setString(nullFlag == 1 ? "NO" : "YES")
.at(19).setString(toSpecificName(catalog, schema, procedureName))
.at(19).setString(toSpecificName(catalog, procedureName))
.toRowValue(false);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/org/firebirdsql/jdbc/metadata/GetProcedures.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ final RowValue createMetadataRow(ResultSet rs, RowValueBuilder valueBuilder) thr
.at(2).setString(procedureName)
.at(6).setString(rs.getString("REMARKS"))
.at(7).setShort(rs.getShort("PROCEDURE_TYPE") == 0 ? procedureNoResult : procedureReturnsResult)
.at(8).setString(toSpecificName(catalog, schema, procedureName))
.at(8).setString(toSpecificName(catalog, procedureName))
.at(9).setShort(rs.getShort("JB_PROCEDURE_TYPE"))
.at(10).setString(rs.getString("JB_PROCEDURE_SOURCE"))
.toRowValue(true);
Expand Down
41 changes: 12 additions & 29 deletions src/main/org/firebirdsql/jdbc/metadata/NameHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,48 +25,31 @@ private NameHelper() {
* Generates a name for the {@code SPECIFIC_NAME} column of {@code getFunctions}, {@code getFunctionColumns},
* {@code getProcedures} and {@code getProcedureColumns}.
* <p>
* According to the JDBC API documentation, the specific name <i>uniquely identifies this [routine]
* within its schema</i>. In other words, the schema itself is not part of the specific name. Its intention is to
* disambiguate overloads (which Firebird doesn't have). ISO 9075-11 (Schemata) only says it is the qualified
* identifier of the routine. Be aware that the name we generate for a packaged routine does not comply with these
* definitions.
* </p>
* <p>
* The specific name is generated as follows:
* </p>
* <ul>
* <li>
* <p>For Firebird versions <em>without</em> schema support</p>
* <ul>
* <li>for non-packaged routines, the {@code routineName}</li>
* <li>for packaged routines, both {@code catalog} (package name) and {@code routineName} are transformed to
* quoted identifiers and separated by {@code .} (period)</li>
* </ul>
* </li>
* <li>
* <p>For Firebird versions <em>with</em> schema support</p>
* <ul>
* <li>for non-packaged routines, both {@code schema} and {@code routineName} are transformed to
* quoted identifiers and separated by {@code .} (period)</li>
* <li>for packaged routines, {@code catalog} (package name), {@code schema} and {@code routineName} are
* transformed to quoted identifiers and separated by {@code .} (period)</li>
* </ul>
* </li>
* <li>for non-packaged routines, {@code routineName} is returned as-is</li>
* <li>for packaged routines, {@code catalog} (package name) and {@code routineName} are transformed to quoted
* identifiers and separated by {@code .} (period)</li>
* </ul>
*
* @param catalog
* generally {@code null}, or &mdash; when {@code useCatalogAsPackage = true} &mdash; an empty string (no
* package) or a package name
* @param schema
* schema name, or {@code null} for Firebird versions without schema support, empty string is handled same
* as {@code null}
* @param routineName
* name of the routine (procedure or function)
* @return specific name
* @since 7
*/
static String toSpecificName(@Nullable String catalog, @Nullable String schema, String routineName) {
if (isNullOrEmpty(catalog) && isNullOrEmpty(schema)) {
// TODO Add schema support: consider quoting always for consistency
return routineName;
} else if (isNullOrEmpty(catalog)) {
return ObjectReference.of(schema, routineName).toString();
}
// this order assumes the catalog actually represents the package name
return ObjectReference.of(schema, catalog, routineName).toString();
static String toSpecificName(@Nullable String catalog, String routineName) {
return isNullOrEmpty(catalog) ? routineName : ObjectReference.of(catalog, routineName).toString();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void testFunctionColumnMetaData_useCatalogAsPackage_specificPackageProcedureColu
try (var connection = DriverManager.getConnection(getUrl(), props)) {
dbmd = connection.getMetaData();
List<Map<FunctionColumnMetaData, Object>> expectedColumns = withCatalog("WITH$FUNCTION", withSpecificName(
ObjectReference.of(ifSchemaElse("PUBLIC", ""), "WITH$FUNCTION", "IN$PACKAGE").toString(),
ObjectReference.of("WITH$FUNCTION", "IN$PACKAGE").toString(),
List.of(createNumericalType(Types.INTEGER, "IN$PACKAGE", "PARAM1", 1, 10, 0, true))));
validateExpectedFunctionColumns(catalog, "IN$PACKAGE", "PARAM1", expectedColumns);
}
Expand Down Expand Up @@ -536,7 +536,7 @@ private static List<Map<FunctionColumnMetaData, Object>> getUdfExample2Columns()

private static List<Map<FunctionColumnMetaData, Object>> getWithFunctionInPackageColumns() {
return withCatalog("WITH$FUNCTION",
withSpecificName(ifSchemaElse("\"PUBLIC\".", "") + "\"WITH$FUNCTION\".\"IN$PACKAGE\"",
withSpecificName("\"WITH$FUNCTION\".\"IN$PACKAGE\"",
List.of(
withColumnTypeFunctionReturn(
createNumericalType(Types.INTEGER, "IN$PACKAGE", "PARAM_0", 0, 10, 0, true)),
Expand Down Expand Up @@ -569,8 +569,7 @@ private static List<Map<FunctionColumnMetaData, Object>> withSpecificName(String
private static List<Map<FunctionColumnMetaData, Object>> withSchema(String schema,
List<Map<FunctionColumnMetaData, Object>> rules) {
for (Map<FunctionColumnMetaData, Object> rowRule : rules) {
String functionName = (String) rowRule.get(FunctionColumnMetaData.FUNCTION_NAME);
rowRule.put(FunctionColumnMetaData.SPECIFIC_NAME, ObjectReference.of(schema, functionName).toString());
rowRule.put(FunctionColumnMetaData.SPECIFIC_NAME, rowRule.get(FunctionColumnMetaData.FUNCTION_NAME));
rowRule.put(FunctionColumnMetaData.FUNCTION_SCHEM, schema);
}
return rules;
Expand All @@ -580,8 +579,7 @@ private static Map<FunctionColumnMetaData, Object> createColumn(String functionN
int ordinalPosition, boolean nullable) {
Map<FunctionColumnMetaData, Object> rules = getDefaultValidationRules();
rules.put(FunctionColumnMetaData.FUNCTION_NAME, functionName);
rules.put(FunctionColumnMetaData.SPECIFIC_NAME, ifSchemaElse(
ObjectReference.of("PUBLIC", functionName).toString(), functionName));
rules.put(FunctionColumnMetaData.SPECIFIC_NAME, functionName);
rules.put(FunctionColumnMetaData.COLUMN_NAME, columnName);
rules.put(FunctionColumnMetaData.ORDINAL_POSITION, ordinalPosition);
if (nullable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ private static Map<FunctionMetaData, Object> getPsqlExample(boolean useCatalogAs
rules.put(FunctionMetaData.FUNCTION_CAT, "");
}
rules.put(FunctionMetaData.FUNCTION_NAME, "PSQL$EXAMPLE");
rules.put(FunctionMetaData.SPECIFIC_NAME, ifSchemaElse(
ObjectReference.of("PUBLIC", "PSQL$EXAMPLE").toString(), "PSQL$EXAMPLE"));
rules.put(FunctionMetaData.SPECIFIC_NAME, "PSQL$EXAMPLE");
if (supportsComments) {
rules.put(FunctionMetaData.REMARKS, "Comment on PSQL$EXAMPLE");
}
Expand All @@ -364,7 +363,7 @@ private static Map<FunctionMetaData, Object> getOtherSchemaPsqlExample(boolean u
}
rules.put(FunctionMetaData.FUNCTION_SCHEM, "OTHER_SCHEMA");
rules.put(FunctionMetaData.FUNCTION_NAME, "PSQL$EXAMPLE");
rules.put(FunctionMetaData.SPECIFIC_NAME, ObjectReference.of("OTHER_SCHEMA", "PSQL$EXAMPLE").toString());
rules.put(FunctionMetaData.SPECIFIC_NAME, "PSQL$EXAMPLE");
rules.put(FunctionMetaData.JB_FUNCTION_SOURCE, """
begin
return cast(x as varchar(50));
Expand All @@ -384,7 +383,7 @@ private static Map<FunctionMetaData, Object> getOtherSchemaPsqlExample2(boolean
}
rules.put(FunctionMetaData.FUNCTION_SCHEM, "OTHER_SCHEMA");
rules.put(FunctionMetaData.FUNCTION_NAME, "PSQL$EXAMPLE2");
rules.put(FunctionMetaData.SPECIFIC_NAME, ObjectReference.of("OTHER_SCHEMA", "PSQL$EXAMPLE2").toString());
rules.put(FunctionMetaData.SPECIFIC_NAME, "PSQL$EXAMPLE2");
rules.put(FunctionMetaData.JB_FUNCTION_SOURCE, """
begin
return X+1;
Expand All @@ -404,8 +403,7 @@ private static Map<FunctionMetaData, Object> getUdfExample(boolean useCatalogAsP
rules.put(FunctionMetaData.FUNCTION_CAT, "");
}
rules.put(FunctionMetaData.FUNCTION_NAME, "UDF$EXAMPLE");
rules.put(FunctionMetaData.SPECIFIC_NAME, ifSchemaElse(
ObjectReference.of("PUBLIC", "UDF$EXAMPLE").toString(), "UDF$EXAMPLE"));
rules.put(FunctionMetaData.SPECIFIC_NAME, "UDF$EXAMPLE");
if (supportsComments) {
rules.put(FunctionMetaData.REMARKS, "Comment on UDF$EXAMPLE");
}
Expand All @@ -419,8 +417,7 @@ private static Map<FunctionMetaData, Object> getPackageFunctionExample() {
Map<FunctionMetaData, Object> rules = getDefaultValidationRules();
rules.put(FunctionMetaData.FUNCTION_CAT, "WITH$FUNCTION");
rules.put(FunctionMetaData.FUNCTION_NAME, "IN$PACKAGE");
rules.put(FunctionMetaData.SPECIFIC_NAME,
ObjectReference.of(ifSchemaElse("PUBLIC", ""), "WITH$FUNCTION", "IN$PACKAGE").toString());
rules.put(FunctionMetaData.SPECIFIC_NAME, ObjectReference.of("WITH$FUNCTION", "IN$PACKAGE").toString());
// Stored with package
rules.put(FunctionMetaData.JB_FUNCTION_SOURCE, null);
rules.put(FunctionMetaData.JB_FUNCTION_KIND, "PSQL");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void testProcedureColumns_useCatalogAsPackage_specificPackageProcedureColumn(Str

List<Map<ProcedureColumnMetaData, Object>> expectedColumns =
withCatalog("WITH$PROCEDURE", withSpecificName(
ObjectReference.of(ifSchemaElse("PUBLIC", ""), "WITH$PROCEDURE", "IN$PACKAGE").toString(),
ObjectReference.of("WITH$PROCEDURE", "IN$PACKAGE").toString(),
List.of(createNumericalType(Types.INTEGER, "IN$PACKAGE", "RETURN1", 1, 10, 0, true,
DatabaseMetaData.procedureColumnOut))));

Expand Down Expand Up @@ -397,7 +397,7 @@ void testProcedureColumns_useCatalogAsPackage_nonPackagedOnly() throws Exception

private static List<Map<ProcedureColumnMetaData, Object>> getInPackage_allColumns() {
return withCatalog("WITH$PROCEDURE", withSpecificName(
ObjectReference.of(ifSchemaElse("PUBLIC", ""), "WITH$PROCEDURE", "IN$PACKAGE").toString(),
ObjectReference.of("WITH$PROCEDURE", "IN$PACKAGE").toString(),
// TODO Having result columns first might be against JDBC spec
// TODO Describing result columns as procedureColumnOut might be against JDBC spec
List.of(
Expand Down Expand Up @@ -465,7 +465,7 @@ private static Map<ProcedureColumnMetaData, Object> createColumn(String schema,
Map<ProcedureColumnMetaData, Object> rules = getDefaultValueValidationRules();
rules.put(ProcedureColumnMetaData.PROCEDURE_SCHEM, schema);
rules.put(ProcedureColumnMetaData.PROCEDURE_NAME, procedureName);
rules.put(ProcedureColumnMetaData.SPECIFIC_NAME, getProcedureSpecificName(schema, procedureName));
rules.put(ProcedureColumnMetaData.SPECIFIC_NAME, procedureName);
rules.put(ProcedureColumnMetaData.COLUMN_NAME, columnName);
rules.put(ProcedureColumnMetaData.ORDINAL_POSITION, ordinalPosition);
rules.put(ProcedureColumnMetaData.COLUMN_TYPE, columnType);
Expand All @@ -476,11 +476,6 @@ private static Map<ProcedureColumnMetaData, Object> createColumn(String schema,
return rules;
}

private static String getProcedureSpecificName(String schema, String procedureName) {
if (schema == null || schema.isEmpty()) return procedureName;
return ObjectReference.of(schema, procedureName).toString();
}

@SuppressWarnings("SameParameterValue")
private static Map<ProcedureColumnMetaData, Object> createStringType(int jdbcType, String procedureName,
String columnName, int ordinalPosition, int length, boolean nullable, int columnType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ static boolean isIgnoredProcedure(String specificName) {
final class Ignored {
// Skipping procedures from system packages (when testing with useCatalogAsPackage=true)
private static final List<String> PREFIXES_TO_IGNORE =
List.of("\"SYSTEM\".\"RDB$", "\"RDB$BLOB_UTIL\".", "\"RDB$PROFILER\".", "\"RDB$TIME_ZONE_UTIL\".",
"\"RDB$SQL\".");
List.of("\"RDB$BLOB_UTIL\".", "\"RDB$PROFILER\".", "\"RDB$TIME_ZONE_UTIL\".", "\"RDB$SQL\".");
}
return Ignored.PREFIXES_TO_IGNORE.stream().anyMatch(specificName::startsWith);
}
Expand Down Expand Up @@ -439,8 +438,7 @@ Map<ProcedureMetaData, Object> getSpecificValidationRules(Map<ProcedureMetaData,
rules.put(ProcedureMetaData.PROCEDURE_NAME, "NORMAL_PROC_NO_RETURN");
rules.put(ProcedureMetaData.PROCEDURE_TYPE, DatabaseMetaData.procedureNoResult);
rules.put(ProcedureMetaData.JB_PROCEDURE_TYPE, FirebirdDatabaseMetaData.jbProcedureTypeExecutable);
rules.put(ProcedureMetaData.SPECIFIC_NAME, ifSchemaElse(
ObjectReference.of("PUBLIC", "NORMAL_PROC_NO_RETURN").toString(), "NORMAL_PROC_NO_RETURN"));
rules.put(ProcedureMetaData.SPECIFIC_NAME, "NORMAL_PROC_NO_RETURN");
rules.put(ProcedureMetaData.JB_PROCEDURE_SOURCE, extractBody(CREATE_NORMAL_PROC_NO_RETURN));
return rules;
}
Expand All @@ -453,8 +451,7 @@ Map<ProcedureMetaData, Object> getSpecificValidationRules(Map<ProcedureMetaData,
rules.put(ProcedureMetaData.PROCEDURE_TYPE, DatabaseMetaData.procedureReturnsResult);
rules.put(ProcedureMetaData.JB_PROCEDURE_TYPE, FirebirdDatabaseMetaData.jbProcedureTypeExecutable);
rules.put(ProcedureMetaData.REMARKS, "Some comment");
rules.put(ProcedureMetaData.SPECIFIC_NAME, ifSchemaElse(
ObjectReference.of("PUBLIC", "NORMAL_PROC_WITH_RETURN").toString(), "NORMAL_PROC_WITH_RETURN"));
rules.put(ProcedureMetaData.SPECIFIC_NAME, "NORMAL_PROC_WITH_RETURN");
rules.put(ProcedureMetaData.JB_PROCEDURE_SOURCE, extractBody(CREATE_NORMAL_PROC_WITH_RETURN));
return rules;
}
Expand All @@ -466,8 +463,7 @@ Map<ProcedureMetaData, Object> getSpecificValidationRules(Map<ProcedureMetaData,
rules.put(ProcedureMetaData.PROCEDURE_NAME, "quoted_proc_no_return");
rules.put(ProcedureMetaData.PROCEDURE_TYPE, DatabaseMetaData.procedureNoResult);
rules.put(ProcedureMetaData.JB_PROCEDURE_TYPE, FirebirdDatabaseMetaData.jbProcedureTypeExecutable);
rules.put(ProcedureMetaData.SPECIFIC_NAME, ifSchemaElse(
ObjectReference.of("PUBLIC", "quoted_proc_no_return").toString(), "quoted_proc_no_return"));
rules.put(ProcedureMetaData.SPECIFIC_NAME, "quoted_proc_no_return");
rules.put(ProcedureMetaData.JB_PROCEDURE_SOURCE, extractBody(CREATE_QUOTED_PROC_NO_RETURN));
return rules;
}
Expand All @@ -481,7 +477,7 @@ Map<ProcedureMetaData, Object> getSpecificValidationRules(Map<ProcedureMetaData,
rules.put(ProcedureMetaData.PROCEDURE_TYPE, DatabaseMetaData.procedureReturnsResult);
rules.put(ProcedureMetaData.JB_PROCEDURE_TYPE, FirebirdDatabaseMetaData.jbProcedureTypeExecutable);
rules.put(ProcedureMetaData.SPECIFIC_NAME,
ObjectReference.of(ifSchemaElse("PUBLIC", ""), "WITH$PROCEDURE", "IN$PACKAGE").toString());
ObjectReference.of("WITH$PROCEDURE", "IN$PACKAGE").toString());
// No procedure body for packaged procedures
rules.put(ProcedureMetaData.JB_PROCEDURE_SOURCE, null);
return rules;
Expand All @@ -504,8 +500,7 @@ Map<ProcedureMetaData, Object> getSpecificValidationRules(Map<ProcedureMetaData,
rules.put(ProcedureMetaData.PROCEDURE_NAME, "PROC_NO_RETURN");
rules.put(ProcedureMetaData.PROCEDURE_TYPE, DatabaseMetaData.procedureNoResult);
rules.put(ProcedureMetaData.JB_PROCEDURE_TYPE, FirebirdDatabaseMetaData.jbProcedureTypeExecutable);
rules.put(ProcedureMetaData.SPECIFIC_NAME,
ObjectReference.of("OTHER_SCHEMA", "PROC_NO_RETURN").toString());
rules.put(ProcedureMetaData.SPECIFIC_NAME, "PROC_NO_RETURN");
rules.put(ProcedureMetaData.JB_PROCEDURE_SOURCE, extractBody(CREATE_OTHER_SCHEMA_PROC_NO_RETURN));
return rules;
}
Expand Down
Loading