neosqlite 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neosqlite",
|
|
3
3
|
"description": "A lightweight wrapper around better-sqlite3 that adds developer-friendly features like job scheduling, migrations, error handling, query logging, SQL utilities, and more",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.12",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc",
|
package/lib/src/client/util.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ExecuteQueryParams, NeosqliteConfig } from "../types";
|
|
2
|
-
export declare const parseQuery: (params: ExecuteQueryParams) =>
|
|
2
|
+
export declare const parseQuery: (params: ExecuteQueryParams) => {
|
|
3
|
+
sql: string;
|
|
4
|
+
args: Record<string, string | number | boolean | null>;
|
|
5
|
+
};
|
|
3
6
|
export declare const runQuery: (config: NeosqliteConfig, params: ExecuteQueryParams, fn: Function) => any;
|
|
4
7
|
/**
|
|
5
8
|
* Join a list of strings into a single string for
|
package/lib/src/client/util.js
CHANGED
|
@@ -10,11 +10,11 @@ async function New({ name, migrationPath }) {
|
|
|
10
10
|
import type { NeosqliteClient } from 'neosqlite';
|
|
11
11
|
|
|
12
12
|
export default class Migration_${epochTime}_${name} {
|
|
13
|
-
public static
|
|
13
|
+
public static up(db: NeosqliteClient) {
|
|
14
14
|
// Add your migration logic here
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
public static
|
|
17
|
+
public static down(db: NeosqliteClient) {
|
|
18
18
|
// Add your rollback logic here
|
|
19
19
|
}
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neosqlite",
|
|
3
3
|
"description": "A lightweight wrapper around better-sqlite3 that adds developer-friendly features like job scheduling, migrations, error handling, query logging, SQL utilities, and more",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.12",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc",
|
package/src/client/util.ts
CHANGED
|
@@ -15,11 +15,11 @@ export default async function New({ name, migrationPath }: NewCommandOptions) {
|
|
|
15
15
|
import type { NeosqliteClient } from 'neosqlite';
|
|
16
16
|
|
|
17
17
|
export default class Migration_${epochTime}_${name} {
|
|
18
|
-
public static
|
|
18
|
+
public static up(db: NeosqliteClient) {
|
|
19
19
|
// Add your migration logic here
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
public static
|
|
22
|
+
public static down(db: NeosqliteClient) {
|
|
23
23
|
// Add your rollback logic here
|
|
24
24
|
}
|
|
25
25
|
}
|