[Kexi] IDENTITY issues in Sybase

Sharan Rao sharanrao at gmail.com
Mon Dec 31 21:11:57 CET 2007


On Monday 24 Dec 2007 5:15:12 pm Jarosław Staniek wrote:
>
> We may want to add empty virtual methods
> Connection::drv_beforeUpdateRow(), Connection::drv_afterUpdateRow()
> Connection::drv_beforeInsertRow(), Connection::drv_afterInsertRow()
> and call them directly before/after executeSQL(m_sql) line.
>

Hi,

 I've attached the modification of kexidb API and Sybase driver adjustments 
for fixing the IDENTITY issues discussed. ( Although I've attached even the 
sybase specific diffs, the focus ,of course, curently is on connection.h/cpp 
API )

> These methods would have similar parameters as updateRow()/insertRow(), so
> you can implement the forementioned drv_* methods for the Sybase driver and
> check in 'QuerySchema &query' and 'RowEditBuffer& buf' whether your
> identity column(s) have to be altered.
>

The API differs from the above namely because, `Inserting` into a row takes 
place from more places in KexiDB that Conenction::insertRow(). There are some 
variants of Connection::insertRecord() to take care of too.
Hence I've changed the signature to   `tablename` and `fieldlist` ( to which 
any QuerySchema and TableSchema can be passed ,of course, but is more general 
for Sybase's requirements).  Sybase as such only wants to know the tablename 
and the AutoIncrement fields that are being modified. Hence the signature I 
specifed seems to do the job.

Any suggestions as to how I can make the API more general ? 

Cheers and Happy New Year to all !!
 Sharan Rao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ASE-fix
Type: text/x-diff
Size: 14712 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kexi/attachments/20080101/66c15ed8/attachment.bin 


More information about the Kexi mailing list