[SQL] Client and server cursors // holdable Cursors

Andreas Grosam agrosam at computerworks.ch
Wed Mar 5 17:13:03 CST 2003



On Mittwoch, 5. März 2003, Ruslan Zasukhin <sunshine at public.kherson.ua> wrote:
>on 3/5/03 3:49 AM, Andreas Grosam at agrosam at computerworks.ch
>wrote:
>
>> One other aspect arises from the fact that a cursor is inherently associated
>> to a transaction.
>> (This has something to do with the locks which might be aquired when building
>> a result set, and when the cursor is updateable).
>> 
>> So, when the transaction will be closed - that is when it will be either
>> committed or rolled back - then all its associated cursors will be
>> unaccessable - means, they will be closed implicitly, too.
>> 
>> But sometimes, developers want to use a cursor even when the corresponding
>> transaction has been closed. So a Cursor shall be "detachable" from its
>> transaction. In SQL3 notation this refers to a "holdable" cursor.
>> 
>> So, "holdable" Cursors remain open when its transaction has been closed.
>> Again, the upcoming (when??) SQL3 Standard explains the behavior of holdable
>> cursors in detail.
>> 
>> Personally, I find this extremely usefull. This is just a Container which can
>> be used just as any other container - but has been populated from a database
>> query, may backup on disk, can be updated, etc.
>
>What you describe as Container?
>
>    "holdable" Cursors
>    or any cursor can be considered as container ?

A Container is just an object which stores other objects.
Thus, a Cursor is a Container.
std::vector<>, too.

A Cursor has a very simple interface, so that it could be used in GUIs on a high abstraction level - without the need to know the underlaying implementation.
It is easy to make a vector a Cursor through an Adpater - but not vise versa. 

>
>-- 
>Best regards,
>Ruslan Zasukhin      [ I feel the need...the need for speed ]
>-------------------------------------------------------------
>e-mail: ruslan at paradigmasoft.com
>web: http://www.paradigmasoft.com
>
>To subscribe to the Valentina mail list go to:
>http://listserv.macserve.net/mailman/listinfo/valentina
>-------------------------------------------------------------
>
>_______________________________________________
>Valentina mailing list
>Valentina at lists.macserve.net
>http://lists.macserve.net/mailman/listinfo/valentina
>




More information about the Valentina mailing list