Changeset 36408 in project


Ignore:
Timestamp:
08/25/18 13:15:46 (4 weeks ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [185.248.160.21]: Add some more documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/sqlite3pth

    r36407 r36408  
    1313== Requirements
    1414
    15 [[pthreads]], [[srfi-18]]
     15[[sql-null]], [[pthreads]], [[srfi-18]], [[srfi-34]], [[llrb-tree]], [[miscmacros]], [[srfi-1]]
    1616
    1717== API
    1818
    19 Currently only lightly
     19Currently only lightly documented at
    2020[[https://github.com/0-8-15/sqlite3pth/|documented here]] at github.
     21
     22<procedure>(:sql-result: string --> (or false fixnum))
     23 convert field name to index
     24    ;;
     25<procedure>    (: sqlite3-prepare ((struct <sqlite3-database>) string --> (struct <sqlite3-statement>)))
     26<procedure>    (: sqlite3-exec ((struct <sqlite3-database>) (or string (struct <sqlite3-statement>)) #!rest -> :sql-result:))
     27<procedure>    (: sqlite3-call-with-transaction
     28       ((struct <sqlite3-database>)
     29        (procedure ((procedure (string #!rest) :sql-result:)) :sql-result:)
     30       -> :sql-result:))
     31<procedure>    sqlite3-call-test/set
     32questionable, undocumented
     33<procedure>    (: sqlite3-close ((struct <sqlite3-database>) -> . *))
     34<procedure>    sqlite3-interrupt!
     35<procedure>    sql-result? ;; test result type
     36<procedure>    (sql-value RESULT ROW FIELD) --> *
     37
     38<procedure>    (: sql-ref (:sql-result: (or boolean fixnum) (or boolean fixnum string symbol) --> *))
     39<procedure>    (: sql-fold (:sql-result: (procedure ((procedure (fixnum) *) *) *) * -> *))
     40
     41<procedure>sqlite3-open
     42<procedure>sqlite3-close
     43<procedure>    (: sqlite3-open-restricted (string #!optional string vector --> (struct <sqlite3-database>)))
     44    Restricted open optionally with VFS.  SQL may not attach other files.
     45    optional string requests sqlite3 VFS, vector holds VFS callbacks
     46
     47<procedure>    (: sqlite3-open-restricted-ro (string #!optional string vector --> (struct <sqlite3-database>)))
     48    Restricted open read only optionally with VFS.  SQL may not attach other files.
     49    optional string requests sqlite3 VFS, vector holds VFS callbacks
     50
     51=== Accessors
     52
     53    sqlite3-database-name
     54    sqlite3-changes
     55    sqlite3-statement?
     56    sqlite3-statement-name
     57
     58    sqlite3-error? sqlite3-error-code sqlite3-error-args
     59<procedure>sqlite3-error-db-locked?
     60
     61=== debug aid
     62<procedure>(sqlite3-debug-statements FLAG)
     63
     64Log queries.
     65
     66== Examples
     67
     68    (define db (sqlite-open "path"))
     69    (sqlite3-exec db "select 1") ; 1
     70    (sqlite3-exec db (sqlite3-prepare db "select ?1") 1) ; 1
     71
    2172
    2273== About this egg
Note: See TracChangeset for help on using the changeset viewer.