467,910 Members | 1,605 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

Open source SQL Parser using C++

nik
Hi,

I need to parse incoming SQL statements (SELECT, INSERT, DELETE etc)
and generate a parse tree. Also i need to find out if there are syntax
errors etc.

Is there any open source SQL Parser which i can use? Also at some
point, i would need to support join etc also so i would need some sort
of SQL Optimizer or Query processor also.

I want to provide SQL interface to a non-sql db which has its own
access APIs. So idea is to tokenize in-coming SQL, validate it and
then using a mapper, access the non-sql db and return the results.

Any comment or input appreciated...If some one has more better design
alternative or open source product which can do the similar task, it
is also welcome.

Thanks in advance,

Mar 16 '07 #1
  • viewed: 8111
Share:
3 Replies
nik wrote:
[..]
Is there any open source SQL Parser which i can use? [..]
Isn't there an SQL newsgroup where you could ask? Parsing
SQL in C++ is NOT C++-specific. It's SQL-specific. That
makes your question off-topic, sorry. Also, GIYF.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Mar 16 '07 #2
On Mar 16, 6:45 pm, "nik" <nikv...@gmail.comwrote:
Hi,

I need to parse incoming SQL statements (SELECT, INSERT, DELETE etc)
and generate a parse tree. Also i need to find out if there are syntax
errors etc.

Is there any open source SQL Parser which i can use? Also at some
point, i would need to support join etc also so i would need some sort
of SQL Optimizer or Query processor also.

I want to provide SQL interface to a non-sql db which has its own
access APIs. So idea is to tokenize in-coming SQL, validate it and
then using a mapper, access the non-sql db and return the results.

Any comment or input appreciated...If some one has more better design
alternative or open source product which can do the similar task, it
is also welcome.

Thanks in advance,
MySql may include the codes of parse SQL statements.

Mar 16 '07 #3
On 16 Mar 2007 03:45:45 -0700, "nik" <ni*****@gmail.comwrote:
>I need to parse incoming SQL statements (SELECT, INSERT, DELETE etc)
and generate a parse tree. Also i need to find out if there are syntax
errors etc.
Is there any open source SQL Parser which i can use? Also at some
point, i would need to support join etc also so i would need some sort
of SQL Optimizer or Query processor also.
I want to provide SQL interface to a non-sql db which has its own
access APIs. So idea is to tokenize in-coming SQL, validate it and
then using a mapper, access the non-sql db and return the results.
Any comment or input appreciated...If some one has more better design
alternative or open source product which can do the similar task, it
is also welcome.
What you describe is far from trivial. SQLite, a widely-used public
domain database, contains what you want but not packaged as library:
http://www.sqlite.org/arch.html

Best wishes,
Roland Pibinger
Mar 16 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Roberto Nunnari | last post: by
reply views Thread by Roberto Nunnari | last post: by
reply views Thread by Roberto Nunnari | last post: by
2 posts views Thread by karthik bala guru | last post: by
8 posts views Thread by Asma | last post: by
8 posts views Thread by Kenneth P | last post: by
10 posts views Thread by thinktwice | last post: by
22 posts views Thread by fniles | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.