[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-03 Thread Paolo Bolzoni
> I can't confirm that 100% off the top of my head but I'm uncoordinated > enough to repeatedly confuse the bind and column value API calls and use > 0-based indices for both and haven't noticed any really untoward behaviour > (beyond my code not working and requiring fixing). I know the feeling,

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-03 Thread Scott Hess
On Tue, Mar 3, 2015 at 3:33 AM, Paolo Bolzoni wrote: >> I can't confirm that 100% off the top of my head but I'm uncoordinated >> enough to repeatedly confuse the bind and column value API calls and use >> 0-based indices for both and haven't noticed any really untoward behaviour >> (beyond my

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread Donald Shepherd
On Tue, 3 Mar 2015 at 03:01 Simon Slavin wrote: > > On 2 Mar 2015, at 12:23am, Jay Kreibich wrote: > > > Every database I?ve every used starts SQL parameter indexes from 1. I?m > not sure it is part of the SQL standard, but it is more or less the defacto > standard of SQL APIs, and might be

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread R.Smith
On 2015-03-02 04:51 PM, Paolo Bolzoni wrote: > I kinda get your point, but still we are speaking of the C interface > all the time. Sure in other contexts, like the TCL/SQL, the indexes > start from 1. However the bind and the column function are both in the > C interface. It's when the C

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread Nesvarbu Ne
Valodia valodia

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread Simon Slavin
On 2 Mar 2015, at 12:23am, Jay Kreibich wrote: > Every database I?ve every used starts SQL parameter indexes from 1. I?m not > sure it is part of the SQL standard, but it is more or less the defacto > standard of SQL APIs, and might be considered part of the SQL language. I hope the SQLite

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread Paolo Bolzoni
I kinda get your point, but still we are speaking of the C interface all the time. Sure in other contexts, like the TCL/SQL, the indexes start from 1. However the bind and the column function are both in the C interface. Oh, well... I just have to wrap my mind around it. Definitely not a real

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread Jay Kreibich
On Mar 2, 2015, at 8:51 AM, Paolo Bolzoni wrote: > I kinda get your point, but still we are speaking of the C interface > all the time. Not exactly. SQL parameters are defined in SQL, and they?re part of the SQL language. The parameter placement (and from that, their indexing and binding)

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread Igor Tandetnik
On 3/2/2015 9:51 AM, Paolo Bolzoni wrote: > I kinda get your point, but still we are speaking of the C interface > all the time. Sure in other contexts, like the TCL/SQL, the indexes > start from 1. However the bind and the column function are both in the > C interface. Not quite. There's ?N

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-01 Thread Richard Hipp
On 3/1/15, Paolo Bolzoni wrote: > Dear everyone, > > I find strange and confusing that bind indexes start from 1 (docs in > [1]) and instead column indexes start from 0 (doc in [2]). Is there > any technical reason or it is just an unlucky legacy? Seems like there was a reason for this, 11 years

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-01 Thread R.Smith
On 2015-03-01 04:41 PM, Paolo Bolzoni wrote: > Dear everyone, > > I find strange and confusing that bind indexes start from 1 (docs in > [1]) and instead column indexes start from 0 (doc in [2]). Is there > any technical reason or it is just an unlucky legacy? I'm going to venture a guess here

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-01 Thread Jay Kreibich
On Mar 1, 2015, at 5:33 PM, Richard Hipp wrote: > On 3/1/15, Paolo Bolzoni wrote: >> Dear everyone, >> >> I find strange and confusing that bind indexes start from 1 (docs in >> [1]) and instead column indexes start from 0 (doc in [2]). Is there >> any technical reason or it is just an

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-01 Thread Paolo Bolzoni
Dear everyone, I find strange and confusing that bind indexes start from 1 (docs in [1]) and instead column indexes start from 0 (doc in [2]). Is there any technical reason or it is just an unlucky legacy? Yours faithfully, Paolo [1] https://www.sqlite.org/c3ref/bind_blob.html [2]