Fix namespace qualification and add provider-wide namespace tests - #201
Open
jogibear9988 wants to merge 6 commits into
Open
jogibear9988 wants to merge 6 commits into
jogibear9988 wants to merge 6 commits into
Conversation
Resolve qualified table names consistently in native catalogs and honor the factory defaultSchema for every provider. Scope table enumeration to the selected namespace instead of hardcoding public/current-user or assuming ADO.NET GetSchema restriction positions. Fix MySQL/MariaDB and Db2 catalogs, Informix/Sybase owner qualification, SQL Server column lookups and renames, Oracle/HANA index namespaces, and namespace-preserving renames. Add native Ingres table/view/column and constraint/index-existence queries. Explicitly reject namespaces for the Firebird 5 provider. Keep SQLite attached-database metadata, rebuild temporary tables, indexes, triggers and AUTOINCREMENT sequence state in the original namespace. Scope dependent-table scans and check FK integrity across attached databases; reject cross-database SQLite foreign keys before creating a table. Add contracts for all 16 public provider selectors, live lifecycle cases in four naming modes for all 11 CI engines, seven-engine duplicate-name isolation cases, and SQLite/MonoSQLite attached-database regression tests. Reuse the existing disposable-provider fixture and document engine/verification limits. Validation: 1,231 unit/SQLite tests passed locally, zero failures or skips. Server database validation runs in PR CI; Docker is unavailable locally. Ingres has no configured live engine job and retains its pre-existing unsupported structured index/FK metadata operations. Refs #48
Use provider column rendering in namespace lifecycle views and scalar queries so HANA tests query the same identifiers created by the provider. Validation: all 1,231 unit and SQLite tests pass.
Scope PostgreSQL index queries by relation identity; resolve quoted ASE owners through native catalogs; preserve Oracle index folding and automatically quoted namespace names. Route HANA single-action foreign keys through supported RESTRICT mapping. Keep Firebird constraint names separate from namespace validation and reject its unsupported native table rename explicitly. Make unique-key test columns non-null for Db2 and expose per-test CI progress. Validation: 1,231 local unit/SQLite tests pass; live matrix rerun required.
Render the resolved table name for shared RenameColumn and RemoveColumn commands, including default and automatically quoted namespaces. Extend duplicate-name tests to cover both operations. Validate ASE rename ownership before using the local name required by sp_rename. Reconnect the Firebird lifecycle fixture before final DROP to release compiled metadata dependencies after view and foreign-key changes. Validation: 1,231 unit/SQLite tests pass locally; previous server run passes SQL Server, PostgreSQL, MySQL, MariaDB, Db2, Informix and HANA.
Normalize rename destinations with the same dialect quoting rules as sources so Oracle numeric-leading mixed-case schema names retain identity. Use an owner-checked local ASE table for DROP INDEX, which rejects three-part names. Remove dependent indexes before column rename in the isolation fixture for Db2. Serialize disposable Oracle user cleanup to prevent concurrent DROP USER dictionary-lock conflicts observed in CI. Validation: all 1,231 unit/SQLite tests pass locally.
Implement structured PK, unique, check and composite foreign-key catalogs with schema-qualified joins, exact parent identity, ordered key pairs and segmented definition parsing. Inspect and create secondary indexes, distinguish their backing constraints, and scope index/constraint/column and incoming/outgoing foreign-key removal to the requested owner. Add 19 executable catalog and DDL contract regressions covering all four namespace modes, duplicate names, included columns, quoted parents, CHAR padding and referential actions. Add an opt-in live Ingres lifecycle fixture. Local validation: 1,250 unit/SQLite tests pass with zero skips; live fixture compiles and discovers four additional cases. A live Ingres run remains unavailable because no licensed instance is available.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix namespace handling where DDL targeted one schema/database while metadata inspected another. Explicitly qualified names now override the configured default, native catalogs scope lookups to the same object, and shared column/table mutations preserve that namespace. PostgreSQL index lookup no longer mixes identical names from different schemas.
Includes provider-specific catalog, index, rename and foreign-key fixes, plus SQLite attached-database rebuilds that preserve indexes, triggers, data and AUTOINCREMENT state. Ingres now implements structured PK/unique/check/FK and index metadata, composite and cross-owner foreign keys, secondary-index creation, constraint-backed index removal, and incoming/outgoing foreign-key removal. Its DROP COLUMN and DROP CONSTRAINT statements use native RESTRICT syntax.
Tests cover all 16 provider selectors through command contracts, four naming modes on all 11 live CI engines, duplicate-name isolation on seven engines, and dotted attached-database names on both SQLite selectors. The lifecycle covers tables, views, columns/defaults, data, PK/FK/unique/index metadata, removal and supported renames. Another 19 Ingres regressions execute the catalog SELECTs against an independent SQLite catalog fixture and check DDL contracts, including duplicate schemas, key ordering, included columns, CHAR padding, segmented constraint text and referential actions.
Validation: 1,250 unit/SQLite tests pass locally with zero failures or skips. The preceding revision passed all 2,546 CI tests and the combined coverage check; CI is rerunning for the Ingres follow-up. The opt-in Ingres lifecycle fixture compiles and discovers four additional cases, but has not been executed against Ingres.
Engine and verification limits are documented in docs/namespace-support.md: Firebird 5 rejects namespaces and table rename; SQLite rejects cross-database foreign keys; ASE index removal and rename require the connection owner namespace. Ingres live verification requires a licensed test instance and a compatible Actian driver; none is available for this change. Its executable catalog tests are not a substitute for live engine validation. Firebird 6 schemas are outside this provider qualification.
Fixes #48.