[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] Feature request
From:       Simon Slavin <slavins () hearsay ! demon ! co ! uk>
Date:       2009-05-23 14:20:38
Message-ID: F77D2185-EA3E-44AD-AC83-676C9202CBD4 () hearsay ! demon ! co ! uk
[Download RAW message or body]


On 21 May 2009, at 5:59am, Simon Slavin wrote:

> int sqlite3_change_count(sqlite3*)
>
> Returns an integer which is incremented whenn a change is made to any
> table in the database.  May be the value stored in bytes 24..27 of
> file header or something else if that's not what I really want.

Having thought about it some more, I want two different numbers.  One  
of them changes when a field changes: INSERT/DELETE/UPDATE.  The other  
changes when the schema changes: ALTER/DROP/CREATE.  Rather than crowd  
the function library with multiple functions, it might be possible to  
implement it like so:

int sqlite3_change_count(sqlite3*, int cTypes)

when cTypes = 1, you get the number of changes to the schema
when cTypes = 2, you get the number of changes to fields
when cTypes = 3, you get the sum of the above two figures

Or possibly 1 and 2 should be the other way around.

Any ideas, criticism, or reasons it can't be done ?

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic