libraryextensions/sqlite/lib/Sqlite.xtl
Sqlite.xtl -- the facade of the sqlite extension: SQLite databases for X_eTaL (rusqlite, SQLite compiled in). Import: "sq:" u_se< "Sqlite" A database is named by its path, relative to the working directory (or XETAL_SQLITE_ROOT), or ":memory:" for one call's scratch database; each call opens it and closes it. Run with xetal-x (xetal-x --ext DIR puts this directory on XETAL_PATH). Each signature line is written out by the binding macro (lib/Ffi.xtlm).
ˡe̲xec : Char -> Char -> Int
db sq:e_xec sql: run the statements; how many rows they changed.
"e_xec : text text -> int" ᶠᶠⁱb̲ind< "sqlite/exec"
ˡn̲ums : Char -> Char -> Float
db sq:n_ums sql: the result as a Float matrix, rows by columns (NULL is NaN).
"n_ums : text text -> floats" ᶠᶠⁱb̲ind< "sqlite/nums"
ˡt̲exts : Char -> Char -> Char
db sq:t_exts sql: every cell as text, a Char matrix with one row per cell (the first row's cells, then the second's; padded with spaces).
"t_exts : text text -> chars" ᶠᶠⁱb̲ind< "sqlite/texts"
ˡc̲ols : Char -> Char -> Char
db sq:c_ols sql: the query's column names, one per row.
"c_ols : text text -> chars" ᶠᶠⁱb̲ind< "sqlite/cols"
ˡq̲uote : Char -> Char
sq:q_uote t: the text as an SQL literal ('O''Brien'), to put a value into a statement as data, never as SQL.
"q_uote : text -> text" ᶠᶠⁱb̲ind< "sqlite/quote"
ˡi̲mport : Char -> Char -> Int
db sq:i_mport "path.csv" (or "table=path.csv"): a CSV file into a new table named after the file; the header names the columns, their types (INTEGER, REAL, TEXT) come from the data; empty fields are NULL. How many rows it imported.
"i_mport : text text -> int" ᶠᶠⁱb̲ind< "sqlite/import"