-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22/10/11 21:06, Paul Linehan wrote:
> Is there a way of storing SQLite data (tables) as ASCII text rather 
> than as binary data?
> 
> I want to be able to run scripts against my data as well as use
> SQLite.

Yes, and it is very easy.  SQLite has something called virtual tables
where you can register some code to handle tables.  That code can then
look in text files, make internet queries or whatever else meets your
needs.  You can then use regular SQL to make queries independent of what
data format is underlying them.

Virtual tables are documented here:

  http://www.sqlite.org/vtab.html

If you are happy using a higher level language like Python then my APSW
module lets you implement virtual tables easily.  Here is example code
that provides directory listings as a virtual table:

  http://apidoc.apsw.googlecode.com/hg/example.html#example-vtable

Reference documentation:

  http://apidoc.apsw.googlecode.com/hg/vtable.html

APSW includes a more complicated virtual table that lets you use SQLite
against a CouchDB backend:

  http://apidoc.apsw.googlecode.com/hg/couchdb.html

SQLite also provides some functionality using virtual tables such as full
text search and rtree:

  http://www.sqlite.org/fts3.html
  http://www.sqlite.org/rtree.html

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk6jsQQACgkQmOOfHg372QQltgCffbPN2BgbF9MMkrVRs+AM587u
C3oAni6mPiFaZDGCt0WpKu2XfPsqhBAS
=E3QJ
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to