Skip to content

Commit ee6c287

Browse files
committed
chore(fmt)
1 parent fbc8028 commit ee6c287

3 files changed

Lines changed: 85 additions & 87 deletions

File tree

benchmark/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ if (scenarios.length === 0) {
156156
optimalIterations = Math.max(10, Math.min(1000, iterations)); // Clamp between 10-1000
157157
if (!isWarmup) {
158158
console.log(
159-
chalk.gray(
160-
` Using ${optimalIterations} iterations per driver`,
161-
),
159+
chalk.gray(` Using ${optimalIterations} iterations per driver`),
162160
);
163161
}
164162

test/node-compat/test-sqlite-database-sync-dispose.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* AUTO-GENERATED - Do not edit. Run 'npm run sync:tests' to regenerate.
99
*/
1010

11-
"use strict";
11+
'use strict';
1212
const { tmpdir, isWindows } = require("../common/test-utils.cjs");
13-
const assert = require("node:assert");
14-
const { join } = require("node:path");
13+
const assert = require('node:assert');
14+
const { join } = require('node:path');
1515
const { DatabaseSync } = require("@photostructure/sqlite");
16-
const { suite, test } = require("node:test");
16+
const { suite, test } = require('node:test');
1717
let cnt = 0;
1818

1919
tmpdir.refresh();
@@ -22,16 +22,16 @@ function nextDb() {
2222
return join(tmpdir.path, `database-${cnt++}.db`);
2323
}
2424

25-
suite("DatabaseSync.prototype[Symbol.dispose]()", () => {
26-
test("closes an open database", () => {
25+
suite('DatabaseSync.prototype[Symbol.dispose]()', () => {
26+
test('closes an open database', () => {
2727
const db = new DatabaseSync(nextDb());
2828
db[Symbol.dispose]();
2929
assert.throws(() => {
3030
db.close();
3131
}, /database is not open/);
3232
});
3333

34-
test("supports databases that are not open", () => {
34+
test('supports databases that are not open', () => {
3535
const db = new DatabaseSync(nextDb(), { open: false });
3636
db[Symbol.dispose]();
3737
assert.throws(() => {

test/node-compat/test-sqlite-statement-sync-columns.test.js

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -8,160 +8,160 @@
88
* AUTO-GENERATED - Do not edit. Run 'npm run sync:tests' to regenerate.
99
*/
1010

11-
"use strict";
12-
const assert = require("node:assert");
11+
'use strict';
12+
const assert = require('node:assert');
1313
const { DatabaseSync } = require("@photostructure/sqlite");
14-
const { suite, test } = require("node:test");
14+
const { suite, test } = require('node:test');
1515

16-
suite("StatementSync.prototype.columns()", () => {
17-
test("returns column metadata for core SQLite types", () => {
18-
const db = new DatabaseSync(":memory:");
16+
suite('StatementSync.prototype.columns()', () => {
17+
test('returns column metadata for core SQLite types', () => {
18+
const db = new DatabaseSync(':memory:');
1919
db.exec(`CREATE TABLE test (
2020
col1 INTEGER,
2121
col2 REAL,
2222
col3 TEXT,
2323
col4 BLOB,
2424
col5 NULL
2525
)`);
26-
const stmt = db.prepare("SELECT col1, col2, col3, col4, col5 FROM test");
26+
const stmt = db.prepare('SELECT col1, col2, col3, col4, col5 FROM test');
2727
assert.deepStrictEqual(stmt.columns(), [
2828
{
2929
__proto__: null,
30-
column: "col1",
31-
database: "main",
32-
name: "col1",
33-
table: "test",
34-
type: "INTEGER",
30+
column: 'col1',
31+
database: 'main',
32+
name: 'col1',
33+
table: 'test',
34+
type: 'INTEGER',
3535
},
3636
{
3737
__proto__: null,
38-
column: "col2",
39-
database: "main",
40-
name: "col2",
41-
table: "test",
42-
type: "REAL",
38+
column: 'col2',
39+
database: 'main',
40+
name: 'col2',
41+
table: 'test',
42+
type: 'REAL',
4343
},
4444
{
4545
__proto__: null,
46-
column: "col3",
47-
database: "main",
48-
name: "col3",
49-
table: "test",
50-
type: "TEXT",
46+
column: 'col3',
47+
database: 'main',
48+
name: 'col3',
49+
table: 'test',
50+
type: 'TEXT',
5151
},
5252
{
5353
__proto__: null,
54-
column: "col4",
55-
database: "main",
56-
name: "col4",
57-
table: "test",
58-
type: "BLOB",
54+
column: 'col4',
55+
database: 'main',
56+
name: 'col4',
57+
table: 'test',
58+
type: 'BLOB',
5959
},
6060
{
6161
__proto__: null,
62-
column: "col5",
63-
database: "main",
64-
name: "col5",
65-
table: "test",
62+
column: 'col5',
63+
database: 'main',
64+
name: 'col5',
65+
table: 'test',
6666
type: null,
6767
},
6868
]);
6969
});
7070

71-
test("supports statements using multiple tables", () => {
72-
const db = new DatabaseSync(":memory:");
71+
test('supports statements using multiple tables', () => {
72+
const db = new DatabaseSync(':memory:');
7373
db.exec(`
7474
CREATE TABLE test1 (value1 INTEGER);
7575
CREATE TABLE test2 (value2 INTEGER);
7676
`);
77-
const stmt = db.prepare("SELECT value1, value2 FROM test1, test2");
77+
const stmt = db.prepare('SELECT value1, value2 FROM test1, test2');
7878
assert.deepStrictEqual(stmt.columns(), [
7979
{
8080
__proto__: null,
81-
column: "value1",
82-
database: "main",
83-
name: "value1",
84-
table: "test1",
85-
type: "INTEGER",
81+
column: 'value1',
82+
database: 'main',
83+
name: 'value1',
84+
table: 'test1',
85+
type: 'INTEGER',
8686
},
8787
{
8888
__proto__: null,
89-
column: "value2",
90-
database: "main",
91-
name: "value2",
92-
table: "test2",
93-
type: "INTEGER",
89+
column: 'value2',
90+
database: 'main',
91+
name: 'value2',
92+
table: 'test2',
93+
type: 'INTEGER',
9494
},
9595
]);
9696
});
9797

98-
test("supports column aliases", () => {
99-
const db = new DatabaseSync(":memory:");
98+
test('supports column aliases', () => {
99+
const db = new DatabaseSync(':memory:');
100100
db.exec(`CREATE TABLE test (value INTEGER)`);
101-
const stmt = db.prepare("SELECT value AS foo FROM test");
101+
const stmt = db.prepare('SELECT value AS foo FROM test');
102102
assert.deepStrictEqual(stmt.columns(), [
103103
{
104104
__proto__: null,
105-
column: "value",
106-
database: "main",
107-
name: "foo",
108-
table: "test",
109-
type: "INTEGER",
105+
column: 'value',
106+
database: 'main',
107+
name: 'foo',
108+
table: 'test',
109+
type: 'INTEGER',
110110
},
111111
]);
112112
});
113113

114-
test("supports column expressions", () => {
115-
const db = new DatabaseSync(":memory:");
114+
test('supports column expressions', () => {
115+
const db = new DatabaseSync(':memory:');
116116
db.exec(`CREATE TABLE test (value INTEGER)`);
117-
const stmt = db.prepare("SELECT value + 1, value FROM test");
117+
const stmt = db.prepare('SELECT value + 1, value FROM test');
118118
assert.deepStrictEqual(stmt.columns(), [
119119
{
120120
__proto__: null,
121121
column: null,
122122
database: null,
123-
name: "value + 1",
123+
name: 'value + 1',
124124
table: null,
125125
type: null,
126126
},
127127
{
128128
__proto__: null,
129-
column: "value",
130-
database: "main",
131-
name: "value",
132-
table: "test",
133-
type: "INTEGER",
129+
column: 'value',
130+
database: 'main',
131+
name: 'value',
132+
table: 'test',
133+
type: 'INTEGER',
134134
},
135135
]);
136136
});
137137

138-
test("supports subqueries", () => {
139-
const db = new DatabaseSync(":memory:");
138+
test('supports subqueries', () => {
139+
const db = new DatabaseSync(':memory:');
140140
db.exec(`CREATE TABLE test (value INTEGER)`);
141-
const stmt = db.prepare("SELECT * FROM (SELECT * FROM test)");
141+
const stmt = db.prepare('SELECT * FROM (SELECT * FROM test)');
142142
assert.deepStrictEqual(stmt.columns(), [
143143
{
144144
__proto__: null,
145-
column: "value",
146-
database: "main",
147-
name: "value",
148-
table: "test",
149-
type: "INTEGER",
145+
column: 'value',
146+
database: 'main',
147+
name: 'value',
148+
table: 'test',
149+
type: 'INTEGER',
150150
},
151151
]);
152152
});
153153

154-
test("supports statements that do not return data", () => {
155-
const db = new DatabaseSync(":memory:");
156-
db.exec("CREATE TABLE test (value INTEGER)");
157-
const stmt = db.prepare("INSERT INTO test (value) VALUES (?)");
154+
test('supports statements that do not return data', () => {
155+
const db = new DatabaseSync(':memory:');
156+
db.exec('CREATE TABLE test (value INTEGER)');
157+
const stmt = db.prepare('INSERT INTO test (value) VALUES (?)');
158158
assert.deepStrictEqual(stmt.columns(), []);
159159
});
160160

161-
test("throws if the statement is finalized", () => {
162-
const db = new DatabaseSync(":memory:");
163-
db.exec("CREATE TABLE test (value INTEGER)");
164-
const stmt = db.prepare("SELECT value FROM test");
161+
test('throws if the statement is finalized', () => {
162+
const db = new DatabaseSync(':memory:');
163+
db.exec('CREATE TABLE test (value INTEGER)');
164+
const stmt = db.prepare('SELECT value FROM test');
165165
db.close();
166166
assert.throws(() => {
167167
stmt.columns();

0 commit comments

Comments
 (0)