Hi list,

I just want to announce that I've finished a first version of "SQLite Xtra", a free SQL-capable database xtra that I'm currently working on:
http://dasdeck.de/staff/valentin/xtras/sqlite/win/

As the name implies, it's based on the open source database engine "SQLite" which is also used by commercial xtras like Arca Xtra and MelixDB Xtra, and for which ports/wrappers for many different programming languages exist, like e.g. perl, php, python, ...(see http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers).

SQLite Xtra uses a naming convention for it's basic database functions that is similar to the PHP extension (see interface below), and in addition has a couple of utilitiy functions for embedding/retrieving binary data (binary strings, external files, arbitrary cast members) into/from a database.

A cool feature, in my opinion, is it's support for using lingo functions (so called User Defined Functions, UDFs) inside SQL statements, simply by registering those functions with
 sx = xtra("SQLite").new()
 ...
sx.sqlite_create_function(string functionName, integer numberOfArguments).

Those functions can be either lingo handlers in moviescripts or global functions of any other scripting xtra, which allows short and elegant SQL queries, like e.g. sx.sqlite_create_function("zx_md5_string", 1) -- global function of zlibXtra!
 ...
 sql = "SELECT zx_md5_string(str1) AS md5 FROM test LIMIT 1"
 put sx.sqlite_fetch(sql, 1, errorList)
 -- [[#md5: "900150983cd24fb0d6963f7d28e17f72"]]

It's an early version, there is no real documentation yet (but a demo movie demonstrating usage), and no mac port yet (which will definetly follow soon), but I would appreciate if anybody was willing to test it a bit and send me bug reports, comments etc.

Cheers,
Valentin


put xtra("SQLite").interface()
-- "xtra SQLite
-- SQLite Xtra v0.3 (c) 2005 Valentin Schmidt
-- contact: [EMAIL PROTECTED]
-- based on SQLite 2.8.16
-- see http://sqlite.org/

-- CONSTRUCTOR:
new object me

-- BASIC COMMANDS:
sqlite_open  object me, string, *
sqlite_close object me, *
sqlite_exec  object me, string, *
sqlite_fetch object me, string, *
sqlite_last_insert_rowid object me
sqlite_changes object me
sqlite_create_function object me, string, integer

-- UTILITIES:
*sqlite_escape_string string
*sqlite_encode_binary_string string
*sqlite_decode_binary_string string
*sqlite_encode_binary_file string
*sqlite_decode_binary_file string, string
*sqlite_encode_member any
*sqlite_decode_member string, *
*sqlite_member_to_binary_string any
*sqlite_member_to_binary_file any, string
*sqlite_binary_string_to_member string, any
*sqlite_binary_file_to_member string, any

-- SHELL:
*sqlite_shell string -- just partially implemented, work in progress
"

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to