Skip to content

Accept schema qualified names in SchemaReaderOptions.Tables - #71

Open
DavidBoone wants to merge 1 commit into
loresoft:mainfrom
DavidBoone:schema-qualified-tables
Open

Accept schema qualified names in SchemaReaderOptions.Tables#71
DavidBoone wants to merge 1 commit into
loresoft:mainfrom
DavidBoone:schema-qualified-tables

Conversation

@DavidBoone

Copy link
Copy Markdown
Contributor

One more, I think last, change to SchemaSaurus to get it working with the latest EntityFrameworkCore.Generator on my project. Thank-you!

Table filters matched on the unqualified name alone, so "Orders" pulled in every schema's Orders and there was no way to ask for just one of them. Entries may now be written as "sales.orders", which pins the table to that schema, while bare names keep matching in any schema. That is the convention EF Core scaffolding uses for DatabaseModelFactoryOptions.Tables, so filters written for it carry over unchanged.

Entries are read with SchemaQualifiedName.Parse, so the first dot separates schema from name here as it does everywhere else. Names reach the database as written and are compared with its own identifier rules; only the in-memory SQLite path folds case, matching how SQLite looks objects up.

The four SQL providers share the condition builder and supply their own set membership syntax, which differs in escaping and, on Oracle, in case handling.

Table filters matched on the unqualified name alone, so "Orders" pulled in every
schema's Orders and there was no way to ask for just one of them. Entries may now
be written as "sales.orders", which pins the table to that schema, while bare
names keep matching in any schema. That is the convention EF Core scaffolding
uses for DatabaseModelFactoryOptions.Tables, so filters written for it carry over
unchanged.

Entries are read with SchemaQualifiedName.Parse, so the first dot separates
schema from name here as it does everywhere else. Names reach the database as
written and are compared with its own identifier rules; only the in-memory SQLite
path folds case, matching how SQLite looks objects up.

The four SQL providers share the condition builder and supply their own set
membership syntax, which differs in escaping and, on Oracle, in case handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant