Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#8852 - Add SQLite to the pluginlib

Attached to Project: Rockbox
Opened by Nicolas Pennequin (nicolas_p) - Sunday, 06 April 2008, 03:28 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Sunday, 06 April 2008, 03:32 GMT+2
Task Type Patches
Category Plugins
Status New
Assigned To No-one
Player type All players
Severity Low
Priority Normal
Reported Version current build
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

SQLite is a fast and lightweight SQL database engine library.
See http://www.sqlite.org for more information.

This patch makes it available to use in a plugin and provides a usage example.

Additionally to the patch, the actual library is required. You need to download the amalgamation, available at http://www.sqlite.org/sqlite-amalgamation-3_5_7.zip
It is not included for obvious size reasons.
Extract both sqlite3.c and sqlite3.h to apps/plugins/lib/ and add the following line to the top of sqlite3.c :
#include sqlite3_aux.h
(this file contains everything necessary to make the library compile in the rockbox environment)

The binary size is still very high, we need to strip some features off to make it smaller.

For testing, an SQLite version of the Northwind database is available at http://www.mail-archive.com/sqlite-users@sqlite.org/msg22708.html

This is mainly an experiment. I have no intention of adding it to the core or use it to replace the current Database. However, it might open interesting possibilities for plugins.

Thanks to Frank Gevaerts for helping me with this :)
This task depends upon

View Dependency Graph

Comment by Nicolas Pennequin (nicolas_p) - Sunday, 06 April 2008, 17:21 GMT+2
This version has rockboxSync and rockboxDelete implemented in the VFS, which makes it work much better (the previous version wouldn't write the second column to the actual DB file). It will also link on coldfire targets.
Comment by Dan Everton (safetydan) - Wednesday, 04 June 2008, 12:52 GMT+2
For those of you thinking (like me) of trying to replace tagcache with SQLite here's some size comparisons base on m68k compilation:

Full SQLite compile: sqlite3.o = 476708 bytes
Every optional feature omitted SQLite compile: sqlite3.o = 280664 bytes

tagcache.o: 35880 bytes

These numbers are from SQLite 3.5.9 and the latest SVN of Rockbox. I know object file size != final linked size but it's useful for comparison.

Loading...