pub enum Req {
Open {
name: String,
trace: bool,
},
Close {
conn: u32,
},
Batch {
conn: u32,
sql: String,
},
Exec {
conn: u32,
sql: String,
params: Vec<Value>,
},
Query {
conn: u32,
sql: String,
params: Vec<Value>,
},
QueryNamed {
conn: u32,
sql: String,
params: Vec<Value>,
},
Exists {
name: String,
},
List,
Delete {
name: String,
},
Export {
name: String,
},
Import {
name: String,
bytes: Vec<u8>,
},
}Expand description
One request from the main thread. Connection ids are worker-assigned.
Variants§
Open
Open (creating if absent) the named database file; answers Reply::Conn. trace
installs the engine’s statement trace on the connection, logged to the worker page’s
console (sqlite3_trace_v2; the driver’s trace_sql sets it).
Close
Batch
Run semicolon-separated statements that take no parameters and return no rows; answers
Reply::Ok.
Exec
Run one statement with parameters; answers Reply::Changes.
Query
Run one statement with parameters; answers Reply::Rows.
QueryNamed
Run one statement with its column names; answers Reply::NamedRows.
Exists
Storage-pool verbs, by database name (the file-per-document surface).
List
Delete
Export
The database’s bytes as a plain SQLite file image; answers Reply::Bytes.
Import
Write a SQLite file image under name (replacing any prior content).