HomeActive Query BuilderIncomplete SQL parsing

Incomplete SQL parsing


I am looking to use the non-visual pieces of AQB on the .NET platform but I want to make sure it will work for my purpose. I am developing a SQL text editor (we would eventually upgrade it to use the visual piece optionally), and I'm trying to implement something similar to autocomplete/intellisense. What I need to know is whether I can get table name, table alias, and fields available in subqueries accessible by their alias, all from a sql statement that is basically invalid or incomplete. At the point when I would parse the SQL to figure out what options are available the SQL would usually look like this:

SELECT BLAH. FROM TABLE1 T1, TABLE2 as T2, (SELECT BLAHBLAH FROM TABLE3) as T3

Notice the hanging .(period) after the BLAH. Will AQB parse this well enough to tell me that TABLE1 (T1), TABLE2 (T2), and T3 are available, and preferebly tell me that T3 contains 1 field BLAHBLAH?
Ron Pierce | email
July 13 2010, 02:17 PM
Dear Ron,

Active Query Builder does not have ability to parse incomplete SQL statements, but we already made the SQL text editor (it's availavble in the Trial version for evaluation and in the Professional .NET Subscription for purchasing) that has such functionality implemented.
See the Expression Editor demo or the Full-featured demo projects for details.
Sergey Smagin | email
1 day, 10 hours since original post
I see that, thank you for that. In that demo the database schema is loaded as an xml file all at once, is there a way to load that schema as needed asynchronously while the user is typing. I work with an extremely large Teradata instance and about 10 other database instances from various vendors, and it's not realistic to load the entire database schema at program launch.
Ron Pierce | email
1 day, 20 hours since original post
There's a special "Load metadata asynchronously" demo (in the Samples/LoadMetadataAsync folder) that does exactly what you want.

Please let me know if you'll have any problems with SQL Text Editor while loading metadata asynchronously.
Sergey Smagin | email
1 day, 21 hours since original post
This topic is closed