[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Update to the CHICKEN <-> SQLite3 bindings (v1.2.0)
From: |
Thomas Chust |
Subject: |
[Chicken-users] Update to the CHICKEN <-> SQLite3 bindings (v1.2.0) |
Date: |
Sat, 18 Feb 2006 15:43:01 +0000 (GMT) |
Hello,
in response to a problem report concerning the sqlite3 egg and SQLite3.3.4
some larger changes have been made to the egg for CHICKEN:
- The bindings now handle "valid" NULL statements correctly, which
allows the execution of statements involving a IF [NOT] EXISTS clause
without errors in all situations.
- The bindings perform stricter pointer validity checks for the wrapped
database and statement handles now, which will hopefully help to
prevent or detect problems similar to the reported one more easily in
the future.
- Statement and database handles are now automatically invalidated when
they are successfully finalized to prevent accidental reuse.
Refinalization of successfully finalized handles silently does
nothing.
All additional checks and magic keep the interface backwards compatible.
The new code makes use of the TinyCLOS object framework, which will likely
result in a slight security for performance tradeoff. But in order to
fully support the strange behaviour of sqlite3_prepare in the SQLite3 C
library, the changes were necessary.
The new version of the egg and documentation can be found at
http://www.chust.org/projects/sqlite3.egg
and
http://www.chust.org/projects/sqlite3.html
as usual.
On a sidenote, please keep in mind, that all prepared statement handles
become invalid as soon as the database schema changes -- this can
especially be a pitfall when working with the DROP TABLE IF EXISTS and
CREATE TABLE IF NOT EXISTS syntax, because these statements may compile to
NULL statements that *cannot* be magically invalidated when the database
schema changes. Reexecuting them will thus work, but do nothing, which is
quite likely not what you want...
I hope my changes haven't broken anything -- at least they still work for
me ;) But if you find any bugs, don't hesitate to report them.
cu,
Thomas Chust
- [Chicken-users] Update to the CHICKEN <-> SQLite3 bindings (v1.2.0),
Thomas Chust <=