Skip to content

Commit 8ec2c0a

Browse files
authored
Remove unused SqliteError struct (#192)
While working on tursodatabase/turso#1900, I realized that the rust `SqliteError` struct was not used. I also used this opportunity to revamp the test script. The tests are failing, on this branch and `main`, but with the new script it's clearer what fails. The previous script was also missing a `&&`, so it wouldn't have run to completion. @penberg
2 parents 4131dfb + 245da5b commit 8ec2c0a

File tree

5 files changed

+3388
-27
lines changed

5 files changed

+3388
-27
lines changed

index.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ export interface RunResult {
3232
}
3333
/** Retrieve next row from an iterator synchronously. Needed for better-sqlite3 API compatibility. */
3434
export declare function iteratorNextSync(iter: RowsIterator): Record
35-
/** SQLite error object. */
36-
export declare class SqliteError {
37-
message: string
38-
code: string
39-
rawCode: number
40-
}
4135
/** SQLite database connection. */
4236
export declare class Database {
4337
/**

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,8 @@ if (!nativeBinding) {
310310
throw new Error(`Failed to load native binding`)
311311
}
312312

313-
const { SqliteError, Database, databasePrepareSync, databaseSyncSync, Statement, statementIterateSync, RowsIterator, iteratorNextSync, Record } = nativeBinding
313+
const { Database, databasePrepareSync, databaseSyncSync, Statement, statementIterateSync, RowsIterator, iteratorNextSync, Record } = nativeBinding
314314

315-
module.exports.SqliteError = SqliteError
316315
module.exports.Database = Database
317316
module.exports.databasePrepareSync = databasePrepareSync
318317
module.exports.databaseSyncSync = databaseSyncSync

0 commit comments

Comments
 (0)