Hey Maciej,

2010/1/8 Maciej Sobczak <[email protected]>:
> Hello,
>
> Koen Deforche wrote:
>
> [about number of rows affected]
>
>> I think it has a great value when implementing an optimistic locking
>> strategy (instead of using database locks), which uses a version or
>> date stamp field to detect whether another thread has concurrently
>> modified a particular record while doing a read-modify-write/delete
>> cycle.
>
> Could that be implemented (and encpasulated) with stored procedures?

I am not familiar with stored procedures, but would be interested if
this is a solution.

How would that work? Do I have to implement this differently for every
database? Does every database support stored procedures?

I did found this document http://www.orafaq.com/papers/locking.pdf
which discusses indeed that with oracle they advise to use stored
procedures. At the same time however, I found that with ORCALE,
"SQL%ROWCOUNT" returns the affected row count, so it is easy to
implement this API feature also for Oracle.

Would you consider accepting a patch for SOCI that adds this API call
and implements it for all the backends ?

> Isn't the above scenario a bit too low-level?

I'm not sure I understand how this can be too low-level? You mean to
say that optimistic locking should be implemented by the database? But
that simply isn't the case today, so that is not very pragmatic?

> If SOCI is included into Boost, then you *will* get another dependency
> in terms of bigger Boost library and more linker options that need to be
> used.
> It might be easier for you to install all libraries, but since that is a
> one-time action I do not think it is a valid reason to merge libraries.

Yes, but on the other hand boost has official packages and thus the
hard work will hopefully be done for the user.

I also believe that being integrated in boost will give SOCI a
perception of being more stable (although it does not change the
quality of the library).

> I think that SOCI would benefit more from efforts to make official
> packages for several target systems (rpm, deb, etc.).

That of course would be the second best solution !

Regards,
koen

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to