fix(standalone): error due to SQL returning bigint
Some checks are pending
Checks / main (push) Waiting to run
Dev / Test development (push) Waiting to run
Dev / Build Docker image (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile) (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile.alpine) (push) Blocked by required conditions

This commit is contained in:
Elian Doran 2026-01-17 19:05:09 +02:00
parent ec84e72b4c
commit 458e858b24
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import { type BindableValue, default as sqlite3InitModule } from "@sqlite.org/sqlite-wasm";
import type { DatabaseProvider, RunResult, Statement, Transaction } from "@triliumnext/core";
import sqlite3InitModule from "@sqlite.org/sqlite-wasm";
import type { BindableValue } from "@sqlite.org/sqlite-wasm";
import demoDbSql from "./db.sql?raw";
// Type definitions for SQLite WASM (the library doesn't export these directly)
@ -39,7 +39,7 @@ class WasmStatement implements Statement {
this.stmt.reset();
return {
changes,
lastInsertRowid
lastInsertRowid: typeof lastInsertRowid === "bigint" ? Number(lastInsertRowid) : lastInsertRowid
};
} catch (e) {
// Reset on error to allow reuse

View File

@ -15,7 +15,7 @@ export interface Transaction {
export interface RunResult {
changes: number;
lastInsertRowid: number | bigint;
lastInsertRowid: number;
}
export interface DatabaseProvider {