rado 1.0.12 → 1.0.13
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/dist/core/Sql.d.ts +1 -1
- package/dist/core/Sql.js +4 -2
- package/package.json +2 -2
package/dist/core/Sql.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare class Sql<Value = unknown> implements HasSql<Value> {
|
|
|
41
41
|
nameSelf(name: string): Sql;
|
|
42
42
|
emitTo(emitter: Emitter): void;
|
|
43
43
|
}
|
|
44
|
-
export declare function sql<T>(strings: TemplateStringsArray, ...inner: Array<HasSql>): Sql<T>;
|
|
44
|
+
export declare function sql<T>(strings: TemplateStringsArray, ...inner: Array<HasSql | unknown>): Sql<T>;
|
|
45
45
|
export declare namespace sql {
|
|
46
46
|
export function empty<T>(): Sql<T>;
|
|
47
47
|
export function unsafe<T>(directSql: string | number): Sql<T>;
|
package/dist/core/Sql.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/core/Sql.ts
|
|
2
|
-
import { getSql, internalSql } from "./Internal.js";
|
|
2
|
+
import { getSql, hasSql, internalSql } from "./Internal.js";
|
|
3
3
|
var Chunk = class {
|
|
4
4
|
constructor(type, inner) {
|
|
5
5
|
this.type = type;
|
|
@@ -111,7 +111,9 @@ function sql(strings, ...inner) {
|
|
|
111
111
|
sql2.unsafe(strings[i]);
|
|
112
112
|
if (i < inner.length) {
|
|
113
113
|
const insert = inner[i];
|
|
114
|
-
|
|
114
|
+
if (insert !== null && typeof insert === "object" && hasSql(insert))
|
|
115
|
+
sql2.add(insert);
|
|
116
|
+
else sql2.value(insert);
|
|
115
117
|
}
|
|
116
118
|
}
|
|
117
119
|
return sql2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rado",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"cycles": "madge --circular src/index.ts src/sqlite.ts src/mysql.ts src/postgres.ts",
|
|
12
12
|
"test:bun": "bun test",
|
|
13
13
|
"test:node": "node --test-force-exit --test-concurrency=1 --import tsx --test \"**/*.test.ts\"",
|
|
14
|
-
"test:deno": "deno test --no-check -A --unstable-ffi"
|
|
14
|
+
"test:deno": "deno test --node-modules-dir=false --no-check -A --unstable-ffi"
|
|
15
15
|
},
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"exports": {
|