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 ...

0


source to share


4 answers


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

+8


source


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.

+4


source


I don't believe I have updated my version, but it is currently running 3.4.2 and I can use the new methods with the current version.

And I am running 10.5.5 with the latest (public) iPhone SDK.

0


source


It will most likely be easier to just drop the library into your project and link there.

0


source







All Articles