writedb
writedb(
@path ## symbol (required)
@db null
) -> llll/null
Write SQLite3 database @db as a .llll file.
Arguments
@path[symbol]: Destination path for SQL database as a.llllfile. (required)@db[symbol/null]: Optional database name. If set tonull,'main'is used as the default database name. (default:null).
Output
Query results. [llll/null]
Usage
$events = importmidi('bach.mid'); ## MIDI as table data
$db1 = 'first'; ## database name 1
$db2 = 'second'; ## database name 2
$path = './mydb.llll'; ## output path
createdbtable(
@data $events ## table data
@name 'events' ## table name
@db $db1 ## database name 1
);
writedb(@path $path @db $db1); ## write database 1
readdb(@path $path @db $db2); ## read and load into database 2
$results = querydb('SELECT * FROM events', $db2); ## query database 2
print($results)