-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experiment addition of schema support #1
base: paket-and-new-dotnetsdk-for-main-solution
Are you sure you want to change the base?
experiment addition of schema support #1
Conversation
* cleanup in Rezoom.SQL.Compiler.fsproj, ExprInfo.fs and TypeChecker.fs
@@ -64,6 +69,8 @@ type private ModelChange(model : Model, inference : ITypeInferenceContext) = | |||
return! ModelOps.dropView objName | |||
| DropTable -> | |||
return! ModelOps.dropTable objName | |||
| DropSchema -> | |||
return! ModelOps.dropSchema { Value = Some drop.ObjectName.ObjectName; Source = objName.Source } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rspeele: Note that it is ObjectName
rather than SchemaName
(used for schema qualified objects).
@@ -280,6 +284,10 @@ and [<NoComparison>] | |||
/// Resolve a reference to a table which may occur as part of a TableExpr. | |||
/// This will resolve against the database model and CTEs, but not table aliases defined in the FROM clause. | |||
member this.ResolveObjectReference(name : ObjectName, inferView) = | |||
match this.Model.Schema (Some name.ObjectName) with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rspeele: This is simplest thing that seems to work.
I'm prepending any object resolution here, which may have an impact (no test failing though), should I only do that when the name.SchemaName
is empty? or should it be handled another way?
Sorry I haven't had much time to look at this. I think resolving object name resolution like this might have problems if e.g. somebody makes a table in the default schema whose name collides with a schema name, then tries to drop that table. E.g. in sqlite I see for create schema, which is its own statement, you had the schema name be a |
No description provided.