Recent Changes - Search:

Sqlite

Sqlite

Wize builds in version 3.6.13 of sqlite.

Sqlite Over Sockets: SOS

Mod provides a socket based client/server called SOS.

Gsqlite

Gsqlite is a gui frontend for sqlite.

The Non-Object Command: "db"

Wize defines a new Non-Object Command db command built on top of tclsqlite to enable Validation of Tcl code. eg.

   set d [db open "mydb.db"]
   set lst {}
   db eval $d "select * from sqlite_master where type == 'table'" x {
      if {[string match t* $x(name)]} {
          lappend lst $x(name)
      }
   }
   set ver [db version $d]
   db close $d

db differs from standard tclsqlite in 2 ways. First, the open subcommand generates the handle name. And second, the Tcl body in eval is automatically validated when run with wize -Wall. ie. you will get warnings for syntax errors, bad arguments, etc in your Tcl code.

Following are the sub-command extern definitions for db:

extern authorizer {handle cmd} {{choice SQLITE_OK SQLITE_DENY SQLITE_IGNORE} .\
    {cmd authtype desc1 desc2 dbname trigname}} I \
    "Set authorizer for write, etc"
extern busy {handle {callback {}}} {. . {cmd}} I "Set/get busy-on-open handler"
extern cache {handle scmd {opt {}}} {. . {choice size flush} .} I "Cache options"
extern changes {handle} {} I "Return number of rows changed by last eval"
extern close {handle} {} I "Close an opened db"
extern collate {handle coltype cmd} {. . . {cmd s1 s2}} I "Set collation handler"
extern collation_needed {handle cmd} {. . {cmd coltype}} I \
    "Set callback for undefined collation"
extern commit_hook {handle cmd} {. . cmd} I "Set/get callback for commits"
extern complete {handle sql} {} I "Return 1 if sql is complete"
extern copy {handle algorythm tbl file {colsep {}} {null {}}} {. . \
    {choice rollback abort fail ignorereplace} . . . .} I "Copy data from file into table"
extern enable_load_extension {handle bool} {} I "Allow loading db extensions"
extern errorcode {handle} {} I "Return last error code"
extern eval {handle sql {var {}} {script {}}} {. . . array Code} I "Evaluate sql"
extern exists {handle sql} {} I "Return 1 if query returned values"
extern function {handle name cmd} {. . . {cmd val}} I "Create sql function in Tcl"
extern interrupt {handle} {} I "Interrupt innermost sql execution"
extern last_insert_rowid {handle} {} I "Get rowid from last insertion"
extern nullvalue {handle {null {}}} {} I "Set/get null value"
extern onecolumn {handle sql} {} I "Eval sql and return first element only"
extern open {filename args} {. file {opts -key}} P "Open db file, generating handle-command"
extern opendb {handle filename args} {. . file {opts -key}} I "Open db, using handle-command"
extern profile {handle {cmd {}}} {. . {cmd sql time}} I "Set/get profile callback"
extern progress {handle {n {}} {cmd {}}} {. . Int cmd} I "Set/get progress callback"
extern rekey {handle key} {} I "Change the encryption key on the currently open database"
extern status {handle op} {. . {choice step sort}} I "Get steps/sorts of last transaction"
extern rollback_hook {handle {cmd {}}} {. . cmd} I "Callback invoked on each rollback"
extern timeout {handle ms} {. . Int} I "Set timeout in milliseconds"
extern total_changes {handle} {} I "Return number of changes since open"
extern trace {handle {cmd {}}} {. . {cmd sql}} I "Set/get SQL compiling callback"
extern transaction {handle script args} {. . {vopts ?deferred? \
    ?exclusive? ?immediate?} .} I "Exec Tcl inside SQL transaction"
extern update_hook {handle {cmd {}}} {. . {cmd op x table rowid}} I "Set/get update callback"
extern version {handle} {} I "Return version of sqlite"

Edit - History - Print - Recent Changes - Search
Page last modified on June 11, 2009, at 06:08 PM