Open source SQL Parser using C++

Discussion in 'C++' started by nik, Mar 16, 2007.

  1. nik

    nik Guest

    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,
     
    nik, Mar 16, 2007
    #1
    1. Advertising

  2. 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
     
    Victor Bazarov, Mar 16, 2007
    #2
    1. Advertising

  3. nik

    Guest

    On Mar 16, 6:45 pm, "nik" <> wrote:
    > 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, 2007
    #3
  4. On 16 Mar 2007 03:45:45 -0700, "nik" <> wrote:
    >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
     
    Roland Pibinger, Mar 16, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sumit Gupta
    Replies:
    5
    Views:
    5,503
    QuestaTechnologies
    Sep 21, 2010
  2. Luc The Perverse

    Open Source English Language Parser

    Luc The Perverse, Oct 29, 2005, in forum: Java
    Replies:
    4
    Views:
    4,936
    cjr9968
    Jun 28, 2011
  3. Roberto Nunnari

    new small xml parser Open Source

    Roberto Nunnari, Feb 2, 2004, in forum: XML
    Replies:
    0
    Views:
    451
    Roberto Nunnari
    Feb 2, 2004
  4. Roberto Nunnari
    Replies:
    0
    Views:
    402
    Roberto Nunnari
    Feb 26, 2004
  5. pat eyler
    Replies:
    1
    Views:
    471
    Masayoshi Takahashi
    Mar 5, 2005
Loading...

Share This Page