On Wednesday, 12 October, 2016 10:49 Igor Korgot wrote:
>  Keith,
 
> On Wed, Oct 12, 2016 at 12:01 AM, Keith Medcalf <kmedc...@dessus.com>
> 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 checking for something like this:
> 
> http://dba.fyicenter.com/faq/sql_server_2/SCROLL_Creating_Cursors_for_Back
> ward_Scrolling.html

The SQL Server support for scrollable cursors is implemented "behind the 
scenes" either using client-side support (basically, retrieve/cache results 
into an array, then simulate scrolling backwards by returning previously 
retrieved rows), or using temp tables or keyset temp tables on the server side.
 
> Forward cursors are supported by means of prepare()/step(), but what
> about backward cursors?

SQLite has no built-in support for simulating scrollable cursors.
 
> Thank you.
> 
> >
> > You can save the primary key(s) values and re-issue the query with the
> ORDER BY reversed (row values make this easier).  Or you can do the select
> into a temp table, then play with retrieving the various rows from the
> temp table using the rowid to make it "appear" you are going backwards and
> forwards.  Or you can combine the two and generate the primary keys
> (keyset) into a temporary table, then use the rowid or the keyset to
> simulate scrolling and recreate the rowset on demand with an appropriate
> query (again, row values make this easier).
> >
> > https://www.sqlite.org/draft/rowvalue.html
> > http://use-the-index-luke.com/blog/2014-05/what-i-learned-about-sqlite-
> at-a-postgresql-conference
> >
> >
> >> -----Original Message-----
> >> From: sqlite-users [mailto:sqlite-users-
> boun...@mailinglists.sqlite.org]
> >> On Behalf Of Igor Korot
> >> Sent: Tuesday, 11 October, 2016 21:42
> >> To: Discussion of SQLite Database; General Discussion of SQLite
> Database
> >> Subject: [sqlite] Backward cursor support?
> >>
> >> Hi,
> >> Does SQLite support backward cursor? Something like step_back()?
> >>
> >> If not, what would be a way to do it?
> >>
> >> Thank you.
> >> _______________________________________________
> >> 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