SQLite For Lisp

SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.

In case some of you don't know, I have embedded a SQLite database engine inside of BRX modules for V9/V10 and exposed some of its features to lisp.here is the list of commands

;DSQL_OPEN
;DSQL_CLOSE
;DSQL_CLOSEALL
;DSQL_QUERY
;DSQL_ASSOCQUERY
;DSQL_DML
;DSQL_SCALAR
;DSQL_CMPSTMT
;DSQL_STMTBIND
;DSQL_STMTFNL
;DSQL_VER
;DSQL_SQLITEVER
;DSQL_PRINTF
;DSQL_GETFORMAT
;DSQL_PRINTFX
;DSQL_GETFORMATX
;DSQL_LOADEXTENSION

all the query commands support printf style syntax. i.e.

(DSQL_DML "C:\\MySQLite.db"
  "insert into Test4 values (%d, %.15g, '%s');"
   9 
   3.14159
   "Welcome to the Swamp")

It's fast @ over 10,000 record writes per second
the C++ source is included

for now you can get it here http://www.theswamp.org/index.php?topic=28286.0

Comments

  • This is a supergood news!

    SqLite is wonsderful; especially because stored procedures and triggers are featured (even MS Access Jet  doesn't).

    I'll keep tuned!

    Thank you

  • I updated this code, the functions are about the same except I changed the way the routine handled errors.. see the docs inside, you can get it at the same place

    http://www.theswamp.org/index.php?topic=28286.0

     

    for Bricscad V9 & V10 pro

     

     

    DSQL_OPEN
    DSQL_CLOSE
    DSQL_CLOSEALL
    DSQL_QUERY
    DSQL_ASSOCQUERY
    DSQL_DML
    DSQL_SCALAR
    DSQL_SCALARSTR
    DSQL_CMPSTMT
    DSQL_STMTBIND
    DSQL_STMTFNL
    DSQL_VER
    DSQL_SQLITEVER
    DSQL_PRINTF
    DSQL_GETFORMAT
    DSQL_PRINTFX
    DSQL_GETFORMATX
    DSQL_LOADEXT
    DSQL_LASTERR
    DSQL_DUMPERR

     

    BTY, I enabled store procedures in the SQLite module Enjoy!

  • I updated this code, the functions are about the same except I changed the way the routine handled errors.. see the docs inside, you can get it at the same place

    http://www.theswamp.org/index.php?topic=28286.0

      

    for Bricscad V9 & V10 pro

     

     

    DSQL_OPEN
    DSQL_CLOSE
    DSQL_CLOSEALL
    DSQL_QUERY
    DSQL_ASSOCQUERY
    DSQL_DML
    DSQL_SCALAR
    DSQL_SCALARSTR
    DSQL_CMPSTMT
    DSQL_STMTBIND
    DSQL_STMTFNL
    DSQL_VER
    DSQL_SQLITEVER
    DSQL_PRINTF
    DSQL_GETFORMAT
    DSQL_PRINTFX
    DSQL_GETFORMATX
    DSQL_LOADEXT
    DSQL_LASTERR
    DSQL_DUMPERR

     

    BTY, I enabled store procedures in the SQLite module Enjoy!

This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!