Sqlite3 API update
I want to upgrade / upgrade my standard Leopard Sqlite3 installation to> 3.5 to use the new sqlite_xxx_v2 methods from the Cocoa project.
I can't seem to find any information on how to do this. Does anyone have any tips or a website that describes the update procedure.
Also supported by 3.5+ on iPhone. I understand this is built in, so it shouldn't be a problem ...
source to share
What you want to do is grab the amalgamation sources http://sqlite.org/download.html . Then just compile this to / add it to your project. You don't want to replace the system sqlite - which will have unintended consequences in other applications. Also, I'm pretty sure system sqlite is not a sqlite site ... Apple has probably made its own modifications to it that the kernel data relies on.
You can read the merge info here: http://sqlite.org/amalgamation.html , but in short: '' 'The merge is one C code file named "sqlite3.c" which contains all the C codes for the base library SQLite and FTS3 and RTREE extensions' ''
I also suggest not using sqlite calls directly, they are not meant to be used that way (says sqlite author). Several cocoa wrappers exist instead, including fmdb: http://code.google.com/p/flycode/source/browse/trunk/fmdb/ (which I wrote) :)
-gus
source to share
You really don't want to update the system version of SQLite on Mac OS X. The reason is that all Mac OS X software matches the versions of the packages it includes, as built by Apple's build process. Installing a different version of a package, or even building the same version yourself, but doing it a little differently from Apple, may result in unexpected system behavior.
Finally, if you are embedding a new version of SQLite - or any Open Source library or framework included with Mac OS X - in your own application, you should definitely integrate Darwin changes for it from Apple's open source website. This way, you can be sure to get as close as possible to the same behavior from a library you built yourself while the Apple version ships, which is especially important when it comes to features like locking files in databases.
source to share