[Asterisk-Dev] SQLite Realtime Driver

Steven Sokol steven.sokol at gmail.com
Mon Dec 26 11:09:04 MST 2005


I've spent a good bit of the holiday working on a SQLite driver for
ARA.  This has turned out to be a bit more of a pain than I had
thought...

First, I wrote the driver using SQLite 3.0.  After getting the driver
working (including learning that the \ as escape character is _NOT_
part of the SQL standard and therefore not supported in SQLite) I
found one problem -- PHP does not support SQLite 3.0 until version 5.1
(which has only been out for a few months).

So, I decided to create separate versions for SQLite 2 and SQLite 3. 
After getting the version 2 driver built and compiled, I discovered a
serious flaw which makes it very difficult to use with Asterisk: there
is no way to escape the SQL expression characters (i.e. % and _) in
version 2.  None.  Not-no-way, not-no-how. Argh.  No '_1NXXNXXNXXX'
pattern matching.

So now I ask everyone else here - what's the best solution?  Obviously
we can use SQLite 3 (which will match the literal _ charater) but it
doesn't fit one of my design goals: to play well with PHP.

Thoughts?

Thanks,

Steve

--
Steven Sokol
CEO/Manager
Sokol & Associates, LLC

Ask Me About AstriCon Training!
http://www.astricon.net/



More information about the asterisk-dev mailing list