Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update benchmarks #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
],

"tasks": {
"test": "deno test --unstable-ffi -A test/test.ts",
"test": "deno test -A test/test.ts",
"build": "deno run -A scripts/build.ts",
"bench-deno": "deno run -A --unstable-ffi bench/bench_deno.js 50 1000000",
"bench-deno-ffi": "deno run -A --unstable-ffi bench/bench_deno_ffi.js 50 1000000",
"bench-deno-wasm": "deno run -A --unstable-ffi bench/bench_deno_wasm.js 50 1000000",
"bench-deno": "deno run -A bench/bench_deno.js 50 1000000",
"bench-deno-ffi": "deno run -A bench/bench_deno_ffi.js 50 1000000",
"bench-deno-wasm": "deno run -A bench/bench_deno_wasm.js 50 1000000",
"bench-node": "node bench/bench_node.js 50 1000000",
"bench-bun": "bun run bench/bench_bun.js 50 1000000",
"bench-bun-ffi": "bun run bench/bench_bun_ffi.js 50 1000000",
"bench-c": "./bench/bench 50 1000000",
"bench-python": "python ./bench/bench_python.py",
"bench:northwind": "deno bench -A --unstable-ffi bench/northwind/deno.js",
"bench-wasm:northwind": "deno run -A --unstable-ffi bench/northwind/deno_wasm.js",
"bench:northwind": "deno bench -A bench/northwind/deno.js",
"bench-wasm:northwind": "deno run -A bench/northwind/deno_wasm.js",
"bench-node:northwind": "node bench/northwind/node.mjs",
"bench-bun:northwind": "bun run bench/northwind/bun.js"
},
Expand All @@ -37,7 +37,8 @@
"rules": {
"exclude": [
"camelcase",
"no-explicit-any"
"no-explicit-any",
"no-process-globals"
],
"include": [
"explicit-function-return-type",
Expand Down
6 changes: 3 additions & 3 deletions src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ export class Database {
let result: any;
try {
result = fn(...args);
} catch (err) {
} catch (err: any) {
const buf = new TextEncoder().encode(err.message);
sqlite3_result_error(ctx, buf, buf.byteLength);
return;
Expand Down Expand Up @@ -643,7 +643,7 @@ export class Database {
let result: any;
try {
result = options.step(aggregate, ...args);
} catch (err) {
} catch (err: any) {
const buf = new TextEncoder().encode(err.message);
sqlite3_result_error(ctx, buf, buf.byteLength);
return;
Expand All @@ -666,7 +666,7 @@ export class Database {
let result: any;
try {
result = options.final ? options.final(aggregate) : aggregate;
} catch (err) {
} catch (err: any) {
const buf = new TextEncoder().encode(err.message);
sqlite3_result_error(ctx, buf, buf.byteLength);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function isObject(value: unknown): boolean {
}

export class SqliteError extends Error {
name = "SqliteError";
override name = "SqliteError";

constructor(
public code: number = 1,
Expand Down
Loading