On Thu 28 Mar 2019 at 08:07, Olivier Mascia <o...@integral.be> wrote:

>
> > Le 27 mars 2019 à 18:04, siscia <sisciamir...@yahoo.com> a écrit :
> >
> > I would like to propose a function (named `sqlite3_stmt_action` for the
> sake
> > of discussion) that allow to understand if a specific statement is
> either a
> > SELECT, UPDATE, DELETE or INSERT.
>
> There is probably a much more complex need that I did not grasp reading
> this request. What stops you from parsing the beginning of the statement
> text to decide if it is a select, update, delete or insert?


Because it’s never as simple as it looks... CTEs anyone ? It can be
approximated sure. But will typically be brittle.

I’ve long wished for an AST for SQLite statements but in fact the grammar
actions directly build the internal data structures, it’s not two phase

>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to