[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread mstayros
On 09/01/2016 07:11 ??, Bart Smissaert wrote: >> Presumably this is something the original poster wants. > Yes, need to know if the statement >could< produce rows. > > RBS > > On Sat, Jan 9, 2016 at 4:57 PM, Simon Slavin wrote: > >> On 9 Jan 2016, at 1:18pm, Bart Smissaert wrote: >> but on

[sqlite] Bug in sqlite3_prepare16_v2

2016-01-09 Thread R Smith
On 2016/01/09 6:07 PM, Bart Smissaert wrote: > Ah, OK, overlooked that. > It means that sqlite3_prepare can't be used to check the validity of pragma > statements, also because the pragma could actually run! > Thanks for pointing me to this. > Will need to add some parsing code. Aye, I do this f

[sqlite] Bug in sqlite3_prepare16_v2

2016-01-09 Thread R Smith
On 2016/01/09 5:22 PM, Bart Smissaert wrote: > If I run sqlite3_prepare16_v2 on this statement: > > PRAGMA compile_optionsXXX > > I get a return value of 0 and there is a non-zero statement handle. > I would expect a return value of 1 and a zero statement handle. > > But if I run instead sqlite3_

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Stephan Beal
On Sat, Jan 9, 2016 at 5:57 PM, Simon Slavin wrote: > > On 9 Jan 2016, at 1:18pm, Bart Smissaert wrote: > > >> but only after at least one sqlite3_step() occurred. > > > > It will work before any step, but indeed the statement needs to be > prepared. > > I need to know before stepping, but it ca

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Bart Smissaert
> Presumably this is something the original poster wants. Yes, need to know if the statement >could< produce rows. RBS On Sat, Jan 9, 2016 at 4:57 PM, Simon Slavin wrote: > > On 9 Jan 2016, at 1:18pm, Bart Smissaert wrote: > > >> but only after at least one sqlite3_step() occurred. > > > > It

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Simon Slavin
On 9 Jan 2016, at 1:18pm, Bart Smissaert wrote: >> but only after at least one sqlite3_step() occurred. > > It will work before any step, but indeed the statement needs to be prepared. > I need to know before stepping, but it can do that. For a SELECT which returns no rows I presume it returns

[sqlite] Wish List for 2016: High Level API for Object Oriented Interactive Languages

2016-01-09 Thread da...@andl.org
I agree with Duncan. The original SQL code and a list of bound values. This is a problem we know well and have already solved exactly this way in a different context. Yes, it would be a good new feature request. Regards David M Bennett FACS Andl - A New Database Language - andl.org -Origi

[sqlite] Bug in sqlite3_prepare16_v2

2016-01-09 Thread Bart Smissaert
Ah, OK, overlooked that. It means that sqlite3_prepare can't be used to check the validity of pragma statements, also because the pragma could actually run! Thanks for pointing me to this. Will need to add some parsing code. RBS On Sat, Jan 9, 2016 at 3:57 PM, Richard Hipp wrote: > On 1/9/16, B

[sqlite] Bug in sqlite3_prepare16_v2

2016-01-09 Thread Bart Smissaert
If I run sqlite3_prepare16_v2 on this statement: PRAGMA compile_optionsXXX I get a return value of 0 and there is a non-zero statement handle. I would expect a return value of 1 and a zero statement handle. But if I run instead sqlite3_prepare16_v2 on this statement: PRAGMA compile_options XXX

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread R Smith
On 2016/01/09 1:30 PM, Clemens Ladisch wrote: > Bart Smissaert wrote: >> I am interested to know from the statement string if the statement is >> invalid, row producing (could produce rows) or non row producing. > says about > sqlite3_column_count()

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Bart Smissaert
> but only after at least one sqlite3_step() occurred. It will work before any step, but indeed the statement needs to be prepared. I need to know before stepping, but it can do that. RBS On Sat, Jan 9, 2016 at 12:57 PM, R Smith wrote: > > > On 2016/01/09 1:30 PM, Clemens Ladisch wrote: > >> B

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Bart Smissaert
> sqlite3_column_count Ah, yes that looks good, will try that one. RBS On Sat, Jan 9, 2016 at 11:30 AM, Clemens Ladisch wrote: > Bart Smissaert wrote: > > I am interested to know from the statement string if the statement is > > invalid, row producing (could produce rows) or non row producing.

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Clemens Ladisch
Bart Smissaert wrote: > I am interested to know from the statement string if the statement is > invalid, row producing (could produce rows) or non row producing. says about sqlite3_column_count(): | Return the number of columns in the result set retu

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Bart Smissaert
With row producing I mean you will get return values, so mainly select statements, but also certain pragma's and for example the explain statement. In my thinking I would classify INSERT INTO table1 VALUES(1) as non row producing. RBS On Sat, Jan 9, 2016 at 9:45 AM, Luuk wrote: > > > On 08-01-1

[sqlite] Bug in sqlite3_prepare16_v2

2016-01-09 Thread Richard Hipp
On 1/9/16, Bart Smissaert wrote: > If I run sqlite3_prepare16_v2 on this statement: > > PRAGMA compile_optionsXXX > > I get a return value of 0 and there is a non-zero statement handle. > I would expect a return value of 1 and a zero statement handle. https://www.sqlite.org/mark/pragma.html?No+er

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Luuk
On 08-01-16 21:27, Bart Smissaert wrote: > I am interested to know from the statement string if the statement is > invalid, row producing (could produce rows) or non row producing. I know > sqlite3_prepare16_v2 can see if the statement is valid or not but how about > the other 2? > I can do this

[sqlite] SQLite3 v3.10.0 compilation error

2016-01-09 Thread to...@acm.org
[52c16603] now works OK for me. Thanks. -Original Message- From: to...@acm.org Sent: Friday, January 08, 2016 11:55 PM To: SQLite mailing list Subject: Re: [sqlite] SQLite3 v3.10.0 compilation error Got the latest [3392f8fa] fix from the trunk but now get these errors/warnings: ./sqlit