sql-love 1.1.0 → 1.1.2
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/LICENSE.md +1 -1
- package/README.md +7 -9
- package/dist/index.cjs +574 -110
- package/dist/index.d.ts +9 -9
- package/dist/index.mjs +541 -86
- package/package.json +11 -9
- package/dist/.gitkeep +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -69,17 +69,17 @@ export declare class SelectBuilder {
|
|
|
69
69
|
* The LIMIT to use
|
|
70
70
|
* @private
|
|
71
71
|
*/
|
|
72
|
-
_limit
|
|
72
|
+
_limit?: number;
|
|
73
73
|
/**
|
|
74
74
|
* The OFFSET to use
|
|
75
75
|
* @private
|
|
76
76
|
*/
|
|
77
|
-
_offset
|
|
77
|
+
_offset?: number;
|
|
78
78
|
/**
|
|
79
79
|
* The page used to construct an OFFSET based on the LIMIT
|
|
80
80
|
* @private
|
|
81
81
|
*/
|
|
82
|
-
_page
|
|
82
|
+
_page?: number;
|
|
83
83
|
/**
|
|
84
84
|
* Select constructor
|
|
85
85
|
* @param [sql] A base SQL query to parse
|
|
@@ -374,7 +374,7 @@ export declare class SelectBuilder {
|
|
|
374
374
|
* 'name': 'name COLLATE "jp_JP"'
|
|
375
375
|
* }); // ORDER BY name COLLATE "jp_JP" DESC
|
|
376
376
|
*/
|
|
377
|
-
sortField(fieldName:
|
|
377
|
+
sortField(fieldName: any, mapNames?: Record<string, string>, modifier?: string): this;
|
|
378
378
|
/**
|
|
379
379
|
* Check to see if the given string is 0 or all digits not starting with 0
|
|
380
380
|
* @param string The input string
|
|
@@ -428,7 +428,7 @@ export declare class Parser {
|
|
|
428
428
|
*/
|
|
429
429
|
_extractSubQueries(sql: string): {
|
|
430
430
|
sql: string;
|
|
431
|
-
subQueries:
|
|
431
|
+
subQueries: Record<string, string>;
|
|
432
432
|
};
|
|
433
433
|
/**
|
|
434
434
|
* Inject column subQueries back into this object
|
|
@@ -704,10 +704,10 @@ export declare function runPrismaWithCount<T extends Array<Record<string, any>>
|
|
|
704
704
|
records: T;
|
|
705
705
|
total: number;
|
|
706
706
|
pagination: {
|
|
707
|
-
page: number;
|
|
708
|
-
prevPage: number;
|
|
709
|
-
nextPage: number;
|
|
710
|
-
perPage: number;
|
|
707
|
+
page: number | null;
|
|
708
|
+
prevPage: number | null;
|
|
709
|
+
nextPage: number | null;
|
|
710
|
+
perPage: number | null;
|
|
711
711
|
numPages: number;
|
|
712
712
|
total: number;
|
|
713
713
|
isFirst: boolean;
|