@query-doctor/core 0.2.5 → 0.3.0
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/index.cjs +31 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -6
- package/dist/index.js.map +1 -1
- package/dist/sql/builder.d.ts +6 -0
- package/dist/sql/builder.d.ts.map +1 -1
- package/package.json +4 -2
package/dist/sql/builder.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare class PostgresQueryBuilder {
|
|
|
6
6
|
private isIntrospection;
|
|
7
7
|
private explainFlags;
|
|
8
8
|
private _preamble;
|
|
9
|
+
private parameters;
|
|
10
|
+
private limitSubstitution?;
|
|
9
11
|
constructor(query: string);
|
|
10
12
|
get preamble(): number;
|
|
11
13
|
static createIndex(definition: string, name?: PgIdentifier): PostgresQueryBuilder;
|
|
@@ -13,6 +15,8 @@ export declare class PostgresQueryBuilder {
|
|
|
13
15
|
withQuery(query: string): this;
|
|
14
16
|
introspect(): this;
|
|
15
17
|
explain(flags: string[]): this;
|
|
18
|
+
parameterize(parameters: Record<Parameter, number>): this;
|
|
19
|
+
replaceLimit(limit: number): this;
|
|
16
20
|
build(): string;
|
|
17
21
|
/** Return the "set a=b" parts of the command in the query separate from the explain select ... part */
|
|
18
22
|
buildParts(): {
|
|
@@ -21,5 +25,7 @@ export declare class PostgresQueryBuilder {
|
|
|
21
25
|
};
|
|
22
26
|
private generateSetCommands;
|
|
23
27
|
private generateExplain;
|
|
28
|
+
private substituteQuery;
|
|
24
29
|
}
|
|
30
|
+
export type Parameter = `$${string}`;
|
|
25
31
|
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/sql/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,2BAA2B,GACnC,YAAY,GACZ,WAAW,GACX,SAAS,CAAC;AAEd,qBAAa,oBAAoB;
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/sql/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,2BAA2B,GACnC,YAAY,GACZ,WAAW,GACX,SAAS,CAAC;AAEd,qBAAa,oBAAoB;IASnB,OAAO,CAAC,KAAK;IARzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;IACvD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO,CAAC,iBAAiB,CAAC,CAAS;gBAEf,KAAK,EAAE,MAAM;IAEjC,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,MAAM,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY;IAS1D,MAAM,CAAC,OAAO,EAAE,2BAA2B,EAAE,KAAK,GAAE,OAAc,GAAG,IAAI;IAUzE,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK9B,UAAU,IAAI,IAAI;IAKlB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAK9B,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC;IAKlD,YAAY,CAAC,KAAK,EAAE,MAAM;IAK1B,KAAK,IAAI,MAAM;IASf,uGAAuG;IACvG,UAAU;;;;IAUV,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,eAAe;CAaxB;AAED,MAAM,MAAM,SAAS,GAAG,IAAI,MAAM,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@query-doctor/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Core logic for Query Doctor",
|
|
6
6
|
"license": "",
|
|
7
7
|
"author": "Query Doctor",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/**"
|
|
10
|
+
],
|
|
8
11
|
"type": "module",
|
|
9
|
-
"files": ["dist/**"],
|
|
10
12
|
"main": "dist/index.js",
|
|
11
13
|
"types": "dist/index.d.ts",
|
|
12
14
|
"exports": {
|