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 mailing list <sqlite-users@mailinglists.sqlite.org>
Betreff: Re: [sqlite] Backward cursor support?

 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_Backward_Scrolling.html

Forward cursors are supported by means of prepare()/step(), but what about 
backward 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


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to