Yes, good idea.
I would be interested how other users handle this problem, that is
determining if a statement is (potentially) data producing, non-data
producing
or just invalid.

RBS



On Wed, Aug 1, 2018 at 5:23 PM, David Raymond <david.raym...@tomtom.com>
wrote:

> Use the CLI code as an example and see how they do it?
>
>
>
> -----Original Message-----
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> On Behalf Of Bart Smissaert
> Sent: Wednesday, August 01, 2018 11:56 AM
> To: SQLite mailing list
> Subject: Re: [sqlite] [EXTERNAL] Re: Is pragma index_list without supplied
> table name valid SQL?
>
> > May I ask about your use-case and what specifically is needed?
>
> Probably exactly the same as you are using in your SQLitespeed app.
> There is a SQL text box and the user can type anything in there he/she
> wants.
> App then needs to determine how to handle that string:
> Produce data to show, run a non-data producing SQL, or reject it because it
> is invalid.
>
> > The "let's feed it to the engine and see if it cries" method of error
> detection is dangerous to my mind
>
> Not sure what you mean with that.
> The user decides what he wants to do, app needs to determine how it should
> be handled.
>
> RBS
>
>
>
>
> On Wed, Aug 1, 2018 at 4:39 PM, R Smith <ryansmit...@gmail.com> wrote:
>
> > On 2018/08/01 4:50 PM, Bart Smissaert wrote:
> >
> >> I think you might be right there, but for my practical purpose I need
> the
> >> result to be invalid.
> >> I just wonder if a Halt at row 2 and no further rows produced is good
> way
> >> to determine this.
> >>
> >
> > Such a hard question to answer. It's like asking if a Robo-suitcase is a
> > good idea for your fishing tackle... It /might/ be, but since none of us
> > use it that way, it's hard to answer definitively.
> >
> > That said, David Raymond already did a good job of checking some of the
> > pragmas for you and at least proved that false positives exist for the
> > simple rule you expressed.
> >
> > May I ask about your use-case and what specifically is needed? Perhaps a
> > simpler way exists to get to it. The "let's feed it to the engine and see
> > if it cries" method of error detection is dangerous to my mind,
> especially
> > for pragmas that alter the DB, but it might be perfectly o.k. in your
> > use-case.
> >
> >
> > Cheers,
> > Ryan
> >
> >
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to