Skip to content
Merged
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
Misc. copy editing and fixing typos
  • Loading branch information
mrotteveel committed Oct 25, 2025
commit 04523d7d6f53d117645385e40a3d8b0ea84aaaad
13 changes: 6 additions & 7 deletions devdoc/jdp/jdp-2025-06-schema-support.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Important details related to schemas:
The session default can be configured with `isc_dpb_search_path` (string DPB item).
The current search path can be altered with `SET SEARCH_PATH TO ...`.
`ALTER SESSION RESET` reverts to the session default.
* If `SYSTEM` is not on the search path, it is automatically searched last
* If `SYSTEM` is not on the search path, it is automatically appended to the search path to be searched last
* The "`current`" schema cannot be set separately;
the first valid (i.e. existing) schema listed in the search path is considered the current schema.
* `CURRENT_SCHEMA` and `RDB$GET_CONTEXT('SYSTEM', 'CURRENT_SCHEMA')` return the first valid schema from the search path
Expand All @@ -41,7 +41,7 @@ This is done -- with some exceptions -- at prepare time.
* TPB has new item `isc_tpb_lock_table_schema` to specify the schema of a table to be locked (1 byte length + string data)
* Gbak has additional options to include/exclude (skip) schema data in backup or restore, similar to existing options to include/exclude tables
* Gstat has additional options to specify a schema for operations involving tables
* For validation, `val_sch_incl` and `val_sch_excl` (I don't think we use the equivalent,`val_tab_incl`/`val_tab_excl` in Jaybird, so might not be relevant)
* For validation, `val_sch_incl` and `val_sch_excl` (I don't think we use the related items `val_tab_incl`/`val_tab_excl` in Jaybird, so might not be relevant)
* Stored procedure resolution:
** Unqualified stored procedures (`<name>`) are searched on the search path
** Qualified stored procedures (`<schema-or-package>.<name>`) are first located by schema and name, and if not found, searched on the search path by package and name.
Expand Down Expand Up @@ -83,12 +83,11 @@ On Firebird 5.0 and older, this will be silently ignored.
the connection will not store this value
* `Connection.setSchema(String)` will query the current search path, and if not previously called, it will prepend the schema name to the search path, otherwise it will _replace_ the previously prepended schema name.
The schema name is stored _only_ for this replacement operation (i.e. it will not be returned by `getSchema`!)
+
** The name must match exactly as is stored in the metadata (it is always case-sensitive!)
** Jaybird will take care of quoting, and will always quote on dialect 3
** Existence of the schema is **not** checked, so it is possible the current schema does not change with this operation, as `CURRENT_SCHEMA` reports the first _valid_ schema
** JDBC specifies that "`__Calling ``setSchema`` has no effect on previously created or prepared Statement objects.__`";
Jaybird cannot honour this requirement for plain `Statement`, as schema resolution is on prepare time (which for plain `Statement` is on execute), and not always for `CallableStatement` (as the implementation may delay actual prepare until execution, though we do try to identify the procedure when the callable statement is created and use that to fully-qualify the procedure).
Jaybird cannot honour this requirement for plain `Statement`, as schema resolution is on prepare time (which for plain `Statement` is on execute), and not always for `CallableStatement`, as the implementation may delay actual prepare until execution, though we do try to identify the procedure when the callable statement is created and use that to fully-qualify the procedure.
* Request `isc_info_sql_relation_schema` after preparing a query, record it in `FieldDescriptor`, and return it were relevant for JDBC (e.g. `ResultSetMetaData.getSchemaName(int)`)
** For Firebird 5.0 and older, we need to ensure that JDBC methods continue to report the correct value (i.e. `""` for schema-less objects)
* A Firebird 6.0 variant of the `DatabaseMetaData` and other internal metadata queries needs to be written to address at least the following things:
Expand All @@ -99,12 +98,12 @@ Jaybird cannot honour this requirement for plain `Statement`, as schema resoluti
** `getCatalogs`: TODO: Maybe add a custom column with a list of schema names for `useCatalogAsPackage=true`?
* `FirebirdConnection`
** Added method `String getSearchPath()` to obtain the search path as reported by `RBB$GET_CONTEXT('SYSTEM', 'SEARCH_PATH')`, or `null` if schemas are not supported
** Added method `List<String> getSearchPatList()` to obtain the search path as a list of unquoted object names, or empty list if schemas are not supported
** Added method `List<String> getSearchPathList()` to obtain the search path as a list of unquoted object names, or empty list if schemas are not supported
* `FBCallableStatement`
** On creating the instance, the stored procedure is parsed and identified in the database metadata, including selectability, unless `ignoreProcedureType` is `true`
*** Parsing of callable statements is changed to be able to identify schema, package and procedure, including scope specifiers
*** Parsing of callable statements is changed to be able to identify schema, package and procedure name, including scope specifiers
** Jaybird emulates the lookup rules as used by Firebird, and -- if found -- records the identified procedure so subsequent internal prepares refer to the same procedure, even if the search path changes;
this fulfills the JDBC requirements that a `CallableStatement` is not sensitive to current schema changes *if* Jaybird is able to identify the procedure, behaviour is undefined if the procedure was not found.
this fulfills the JDBC requirements that a `CallableStatement` is not sensitive to current schema changes, but only *if* Jaybird is able to identify the procedure, behaviour is undefined if the procedure was not found.
** The API of `StoredProcedureMetaData` (internal API) is changed to not report selectability, but to update the `FBProcedureCall` instance with selectability and other information, like identified schema and/or package.
** For qualified *and* unambiguous procedure reference, the selectability is cached *per connection*, for unqualified or ambiguous procedure reference, the lookup is performed on each `Connection.prepareCall`, to account for search path changes
** Support for packages was missing in the handling of callable statements, and is added, also for older versions
Expand Down