Re: Getting all changes within a begin; end; transaction

Jose Isaias Cabrera <[email protected]> Wed, 4 Mar 2020 15:28:48 +0000
Newsgroups gmane.comp.db.sqlite.general
Message-ID <VI1P195MB0654038CF2A44FC949B3A0BCDEE50@VI1P195MB0654.EURP195.PROD.OUTLOOK.COM>
Simon Slavin, on Wednesday, March 4, 2020 09:42 AM, wrote...
>
> On 4 Mar 2020, at 2:37pm, Jose Isaias Cabrera <[email protected]> wrote:
>
> > Is there a way to know all the changes that may have happened within
> the full BEGIN and END? Thanks.
>
> Use this function
>
> <https://sqlite.org/c3ref/total_changes.html>
>
> before and after your block, and subtract one from another.

Thanks, this is exactly what I needed.  However, I have found that it does not actually provide the **ACTUAL** changes, but a count of the possible changes.  The reason why I know is that if I have 238 INSERTS, but I have a constraint , there should be 238 INSERTs the first time I run a set of SQL, but if I run the same SQL again, there should not be any records INSERTED, and thus, the amount should be 0, correct?  So, is there one that actually provides the actual number of changes?  Thanks.

josé
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users