Re: [sqlite] LIMIT doesn't return expected rows

2016-10-12 Thread Richard Hipp
On 10/11/16, Keith Medcalf wrote: > > #define SQLITE_ENABLE_EXPLAIN_COMMENTS 1 > > makes it work properly. neither NDEBUG nor SQLITE_DEBUG explicitly defined. > > Over to Richard ... Should now be fixed on trunk and in the latest Prerelease Snapshot at https://sqlite.org/download.html -- D. Ri

Re: [sqlite] Backward cursor support?

2016-10-12 Thread Igor Korot
Keith, On Wed, Oct 12, 2016 at 12:01 AM, Keith Medcalf wrote: > > No -- only navigable database support navigation (ie, hierarchical, network > extended, etc). Relational Databases do not support scrollable cursors > except through trickery and deception. Sorry for the confusion. I'm checkin

Re: [sqlite] Backward cursor support?

2016-10-12 Thread Simon Slavin
On 12 Oct 2016, at 5:49pm, Igor Korot wrote: > Forward cursors are supported by means of prepare()/step(), but what > about backward cursors? If you consider the use of prepare()/step() to be a forward cursor, then it supplies a backward cursor too. Just add "DESC" to the end of your "ORDER B

Re: [sqlite] LIMIT doesn't return expected rows

2016-10-12 Thread David Empson
Works for me building the sqlite3 command line tool from the prerelease snapshot, on both Mac and Windows. SQLite version 3.15.0 2016-10-12 15:15:30 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .read t

Re: [sqlite] LIMIT doesn't return expected rows

2016-10-12 Thread Tobias Ellinghaus
Am Mittwoch, 12. Oktober 2016, 12:11:11 CEST schrieb Richard Hipp: > On 10/11/16, Keith Medcalf wrote: > > #define SQLITE_ENABLE_EXPLAIN_COMMENTS 1 > > > > makes it work properly. neither NDEBUG nor SQLITE_DEBUG explicitly > > defined. > > > > Over to Richard ... > > Should now be fixed on tru

Re: [sqlite] Backward cursor support?

2016-10-12 Thread Jens Alfke
> On Oct 12, 2016, at 9:49 AM, Igor Korot wrote: > > Forward cursors are supported by means of prepare()/step(), but what about > backward cursors? No, SQLite cursors only go in one direction, i.e. there is no step_back function. You could simulate this feature by copying rows into a stack as

Re: [sqlite] Backward cursor support?

2016-10-12 Thread Keith Medcalf
On Wednesday, 12 October, 2016 10:49 Igor Korgot wrote: > Keith, > On Wed, Oct 12, 2016 at 12:01 AM, Keith Medcalf > wrote: > > > No -- only navigable database support navigation (ie, hierarchical, > network extended, etc). Relational Databases do not support scrollable > cursors except thro

Re: [sqlite] Backward cursor support?

2016-10-12 Thread Hick Gunter
SQLite supports only "forward cursors". You do realize that the example given is a "stored procedure"... -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Igor Korot Gesendet: Mittwoch, 12. Oktober 2016 18:49 An: SQLite maili