JDBC-like SQL for ADO.NET
I was working for
Patterns & Practices group on the development of some Application Blocks (
User Interface Process,
Configuration Management,
Application Updater), after that they told me to develop a completly new version for the DAAB where every mehtod of the DAAB uses only ADO.NET interfaces. It will be available online on the following
Workspace this week... i hope.
But it have some limitations for example the SQL syntax, you can't use any ADO.NET provider using the same SQL syntax. I was wondering if it's possible to develop an abstraction over ADO.NET drivers so the client application can issue a generic SQL and then this SQL is converted to the specific SQL supported by the ADO.NET drivers. It's the same approach used by JDBC... what is needed to implement this?
- A generic SQL grammar (scanner and parser). Which receives an SQL which is ADO.NET SQL and creates an AST representation.
- A converter which takes the AST and generates an SQL statement for a specific ADO.NET provider.
.... does anybody have a sample SQL grammar for LEX/YACC or perhaps
Coco/R? I was writing my own grammar to test my idea using
Grammatica.... but my DiegoSQL grammar wont be correct. :)