I'm improving a software where it is possible to create a database, whereby you can define the entities and the properties of the entities, and is translated to SQL queries in order to create/update the database schema.
Also, it is possible to run some tasks, and one of the tasks is based in SQL queries.
And this is the catch. Because we allow the configuration of the system to the users (power users) it is error prone. To avoid that we use the Microsoft.SqlServer.Management.SqlParser.Parser.Parse() method to parse the query. This parse the syntax without run it, and it is great. But I want to do the next step and validate against the schema... But the schema (sometimes) can only exist in our description language, not physically in database (until it is deploy).
I want to validate not only the syntax of the query, as well the query against the database schema without deploy it. For my research the SqlParser was some Metadata classes. Anyone use it? Or try to accomplish this task in other way?