mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-02 13:14:23 +01:00
SqliteWorker: return query result instead of rows for query
This commit is contained in:
@@ -22,7 +22,11 @@ function handleOpen(path: string): void {
|
||||
}
|
||||
|
||||
function handleQuery(sql: string, params: any[] = []) {
|
||||
return db.prepare(sql).all(...params);
|
||||
return {
|
||||
rows: db.prepare(sql).all(...params),
|
||||
numAffectedRows: BigInt(db.changes),
|
||||
insertId: BigInt(db.lastInsertRowId),
|
||||
};
|
||||
}
|
||||
|
||||
self.addEventListener('message', (event: MessageEvent<[string, Msg]>) => {
|
||||
|
||||
Reference in New Issue
Block a user