On 19 Mar 2019, at 6:40pm, siscia <[email protected]> wrote: > Given a statement, is there any way to know if it is an UPDATE, DELETE, > INSERT, SELECT or something else?
It's not simple but if you are actually trying to execute that statement, you can register an authorizer function. <https://sqlite.org/c3ref/set_authorizer.html> The function you specify is passed a parameter which is one of <https://sqlite.org/c3ref/c_alter_table.html> so you could pick out SQLITE_SELECT, SQLITE_INSERT, SQLITE_UPDATE, SQLITE_DELETE, and ignore the others. Or something like it. Your routine returns either SQLITE_OK or SQLITE_DENY depending on whether you want the operation to continue. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

