Skip to content

Commit 9ec4284

Browse files
committed
fix: styling
1 parent 099cae9 commit 9ec4284

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

package/src/DatabaseQueue.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const databaseQueues = new Map<string, DatabaseQueue>()
1717
export function openDatabaseQueue(dbName: string) {
1818
if (isDatabaseOpen(dbName)) {
1919
throw new NitroSQLiteError(
20-
`Database ${dbName} is already open. There is already a connection to the database.`
20+
`Database ${dbName} is already open. There is already a connection to the database.`,
2121
)
2222
}
2323

@@ -29,7 +29,7 @@ export function closeDatabaseQueue(dbName: string) {
2929

3030
if (databaseQueue.inProgress || databaseQueue.queue.length > 0) {
3131
console.warn(
32-
`Database queue for ${dbName} has operations in the queue. Closing anyway.`
32+
`Database queue for ${dbName} has operations in the queue. Closing anyway.`,
3333
)
3434
}
3535

@@ -43,7 +43,7 @@ export function isDatabaseOpen(dbName: string) {
4343
export function throwIfDatabaseIsNotOpen(dbName: string) {
4444
if (!isDatabaseOpen(dbName))
4545
throw new NitroSQLiteError(
46-
`Database ${dbName} is not open. There is no connection to the database.`
46+
`Database ${dbName} is not open. There is no connection to the database.`,
4747
)
4848
}
4949

@@ -99,9 +99,7 @@ function startOperationAsync(dbName: string) {
9999
queue.inProgress = true
100100

101101
const operation = queue.queue.shift()!
102-
setImmediate(() => {
103-
operation.start()
104-
})
102+
setImmediate(operation.start)
105103
}
106104

107105
export function startOperationSync<
@@ -113,7 +111,7 @@ export function startOperationSync<
113111
// Database is busy - cannot execute synchronously
114112
if (databaseQueue.inProgress || databaseQueue.queue.length > 0) {
115113
throw new NitroSQLiteError(
116-
`Cannot run synchronous operation on database. Database ${dbName} is busy with another operation.`
114+
`Cannot run synchronous operation on database. Database ${dbName} is busy with another operation.`,
117115
)
118116
}
119117

0 commit comments

Comments
 (0)