@prisma-psm/pg 1.0.6 → 1.0.7

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.
Files changed (47) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +2 -2
  3. package/src/index.ts +6 -4
  4. package/src/parser/backup/engine.d.ts.map +1 -1
  5. package/src/parser/backup/engine.js +36 -21
  6. package/src/parser/backup/engine.js.map +1 -1
  7. package/src/parser/backup/engine.ts +36 -16
  8. package/src/parser/notice.js +1 -1
  9. package/src/parser/notice.ts +2 -2
  10. package/src/parser/parser.d.ts +1 -0
  11. package/src/parser/parser.d.ts.map +1 -1
  12. package/src/parser/parser.js +3 -1
  13. package/src/parser/parser.js.map +1 -1
  14. package/src/parser/parser.ts +12 -2
  15. package/src/parser/schama.d.ts +3 -0
  16. package/src/parser/schama.d.ts.map +1 -0
  17. package/src/parser/schama.js +16 -0
  18. package/src/parser/schama.js.map +1 -0
  19. package/src/parser/schama.ts +14 -0
  20. package/src/parser/sql.d.ts.map +1 -1
  21. package/src/parser/sql.js +3 -0
  22. package/src/parser/sql.js.map +1 -1
  23. package/src/parser/sql.ts +7 -2
  24. package/src/parser/sys.js +2 -2
  25. package/src/parser/sys.ts +3 -3
  26. package/src/parser/table/engine.js +2 -2
  27. package/src/parser/table/engine.ts +3 -3
  28. package/src/sql/catalog-maps.d.ts +1 -0
  29. package/src/sql/catalog-maps.d.ts.map +1 -0
  30. package/src/sql/catalog-maps.js +283 -0
  31. package/src/sql/catalog-maps.js.map +1 -0
  32. package/src/sql/catalog-maps.ts +281 -0
  33. package/src/sql/sql-builder.d.ts +1 -0
  34. package/src/sql/sql-builder.d.ts.map +1 -0
  35. package/src/sql/sql-builder.js +256 -0
  36. package/src/sql/sql-builder.js.map +1 -0
  37. package/src/sql/sql-builder.ts +254 -0
  38. package/src/utils/escape.d.ts +5 -1
  39. package/src/utils/escape.d.ts.map +1 -1
  40. package/src/utils/escape.js +328 -4
  41. package/src/utils/escape.js.map +1 -1
  42. package/src/utils/escape.ts +331 -4
  43. package/src/utils/script-util.d.ts +26 -0
  44. package/src/utils/script-util.d.ts.map +1 -0
  45. package/src/utils/script-util.js +95 -0
  46. package/src/utils/script-util.js.map +1 -0
  47. package/src/utils/script-util.ts +105 -0
@@ -23,8 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.NUMERIC = exports.DOUBLE = exports.TEXT = exports.VARCHAR = void 0;
26
27
  exports.oid = oid;
27
- exports.val = val;
28
+ exports.lit = lit;
28
29
  const pg = __importStar(require("pg"));
29
30
  const RESERVED_WORDS = new Set([
30
31
  "all", "analyse", "analyze", "and", "any", "array", "as", "asc", "asymmetric",
@@ -51,9 +52,332 @@ function oid(string) {
51
52
  }
52
53
  return pg.escapeIdentifier(string);
53
54
  }
54
- function val(string) {
55
+ function lit(string, type) {
56
+ let _type = "";
57
+ if (!!type && typeof type === "string")
58
+ _type = `::${type}`;
55
59
  if (string === null || string === undefined)
56
- return 'null';
57
- return pg.escapeLiteral(string);
60
+ return `null${_type}`;
61
+ return `${pg.escapeLiteral(string)}${_type}`;
58
62
  }
63
+ exports.VARCHAR = "varchar";
64
+ exports.TEXT = "text";
65
+ exports.DOUBLE = "double precision";
66
+ exports.NUMERIC = "numeric";
67
+ //
68
+ // import PGDataType from "../sql/catalog-maps";
69
+ //
70
+ //
71
+ //
72
+ //
73
+ //
74
+ //
75
+ // export function ObjectArray <T>( value:{[p:string]:T}, callback:( key, value:T )=> void){
76
+ // if( !value ) return;
77
+ // Object.entries( value ).forEach( ([key, value ]) => {
78
+ // callback( key, value );
79
+ // })
80
+ // }
81
+ //
82
+ //
83
+ // export function literalArray( value:any, type:string, recursive?:boolean, recursiveSystanx?:boolean ):string {
84
+ // if( value === null || value === undefined ) return `null`;
85
+ // if( !Array.isArray( value ) ) throw new Error( `Value of ${ value?.toString?.() } is not array` );
86
+ // let cast = ( next:any )=>{
87
+ // let isArray:boolean;
88
+ // if( recursive && Array.isArray( next ) ){
89
+ // next = next.map( element => cast( element ) );
90
+ // isArray = true;
91
+ // } else if( recursive && !!next && typeof next === "object" && !Array.isArray( next ) ){
92
+ // ObjectArray( next, ( key, element ) => {
93
+ // next[ key ] = cast( element );
94
+ // });
95
+ // }
96
+ // let literal = JSON.stringify( next );
97
+ // if( recursive && recursiveSystanx && isArray ) literal = `{${literal.substring(1, literal.length-1 )}}`;
98
+ // return literal;
99
+ // }
100
+ //
101
+ // let result = cast( value );
102
+ // result = `{${result.substring(1, result.length-1 )}}`;
103
+ // return result;
104
+ // }
105
+ //
106
+ //
107
+ // export class Escape<S> {
108
+ // type:string;
109
+ // mode:"type"|"identifier"|"unsafe"|"keyword"|"literal";
110
+ // value:S;
111
+ // asArray:boolean
112
+ // variadic:boolean
113
+ // constructor(type: string, mode: "type" | "identifier" | "unsafe" | "keyword"|"literal", value: S, array:boolean, variadic:boolean ) {
114
+ // if( mode === "identifier" && !value ) throw new Error ( "Valor invalido para identifier");
115
+ // if( typeof value === "number" && Number.isNaN( value ) ) throw new Error( `Number values is NaN!` );
116
+ //
117
+ // this.type = type;
118
+ // this.mode = mode;
119
+ // this.value = value;
120
+ // this.asArray = array;
121
+ // this.variadic = variadic;
122
+ //
123
+ // try {
124
+ // JSON.stringify( this.value );
125
+ // } catch (e) {
126
+ // console.error( `Parse value error: Value`, this.value );
127
+ // throw e;
128
+ // }
129
+ // }
130
+ //
131
+ // literal(){
132
+ // if( this.mode === "unsafe" ) return this.value;
133
+ // if( this.mode === "keyword" ) return this.value;
134
+ // if( this.mode === "literal" ) return lit( this.value?.toString?.()||null );
135
+ //
136
+ // // console.log( "//Resolve nulls")
137
+ // if( this.value === null || this.value === undefined ) return `null`;
138
+ //
139
+ // // console.log( "//Resolve JSON arrays", this.asArray, this.type)
140
+ // if( this.asArray && [ "json", "jsonb" ].includes( this.type ) ) return literalArray( this.value, this.type, false, false );
141
+ //
142
+ // // console.log( "//Resolve arrays", this.asArray, this.type)
143
+ // if( this.asArray ) return literalArray( this.value, this.type, true, true );
144
+ //
145
+ // // console.log( "//Resolve numbers types")
146
+ // if( typeof this.value === "number" ) return `${ this.value }`;
147
+ //
148
+ // // console.log("//Resolve string")
149
+ // if( typeof this.value === "string" ) return this.value;
150
+ //
151
+ // // console.log( "//Resolve boolean")
152
+ // if( typeof this.value === "boolean" ) return `${Boolean(this.value)}`;
153
+ //
154
+ // // console.log("//Resolve other types")
155
+ // if( typeof this.value === "object" ) return JSON.stringify( this.value );
156
+ //
157
+ // throw new Error( `Valor não esperado para ser tratado ${ this.value } as type ${ this.type } in mode ${ this.mode }!` );
158
+ // }
159
+ // }
160
+ //
161
+ // export const TypeFamilyCollection = {
162
+ // UUID :[ "uuid" ] as const,
163
+ // Integer :[ "int2", "smallint", "int", "int4", "integer", "int8", "bigint" ] as const,
164
+ // Real :[ "double", "numeric", "float", "money" ] as const,
165
+ // Text :[ "varchar", "character varying", "text" ] as const,
166
+ // Document : [ "json", "jsonb" ] as const,
167
+ // DocumentArray : [ "json_array", "jsonb_array" ] as const,
168
+ // Time :[ "time", "timetz" ] as const,
169
+ // Date :[ "date" ] as const,
170
+ // DateTime :[ "timestamp", "timestamptz" ] as const,
171
+ // Boolean: [ "boolean", "bool" ] as const
172
+ // } as const;
173
+ //
174
+ // type EscapeMap = {
175
+ // [ K in typeof TypeFamilyCollection[keyof typeof TypeFamilyCollection ][number]&keyof PGDataType]:(
176
+ // args: PGDataType[K]|(PGDataType[K])[]
177
+ // ) => Escape<PGDataType[K]>
178
+ // } & {
179
+ // identifier( object:string):Escape<string>
180
+ // unsafe( expression:string):Escape<string>
181
+ // keyword( keyword:string):Escape<string>
182
+ // literal( keyword:string):Escape<string>
183
+ // any<T>( object:T ):Escape<T>
184
+ // anyOf<T>( object:T, format:string ):Escape<T>
185
+ // }
186
+ //
187
+ // let checkIsValidNumber=( arg )=>{
188
+ // if( arg === null ) return true;
189
+ // let num:number = Number( arg );
190
+ // return !Number.isNaN( num ) && Number.isFinite( num);
191
+ // }
192
+ //
193
+ //
194
+ // function transformValues( array, transform:( original )=> any ){
195
+ // return array.map( check => {
196
+ // if( check === undefined || check === null ) return null;
197
+ // if( Array.isArray( check ) ) return transformValues( check, transform );
198
+ // return transform(check);
199
+ // });
200
+ // }
201
+ //
202
+ // function hasInvalidValueInArray( array:any[], check:( arg )=> boolean ){
203
+ // return !!array.find(value => {
204
+ // if (value === null) return false;
205
+ // if (Array.isArray(value)) return hasInvalidValueInArray(value, check);
206
+ // let valid = check(value);
207
+ // return !valid;
208
+ // });
209
+ // }
210
+ //
211
+ // function createEscape( value, type, variadic, transform:( original )=>any, check:( arg )=> boolean ){
212
+ // if( value === null || value === undefined )
213
+ // return new Escape( type, "type", value, false, variadic );
214
+ // if( Array.isArray( value ) ){
215
+ // let array = transformValues( value, transform );
216
+ // if( hasInvalidValueInArray( array , check ) ) throw new Error( `Invalid scape value ${ value } ${type} in array` );
217
+ // return new Escape( type, "type", value, true, variadic );
218
+ // }
219
+ // let checked = transformValues([ value ], transform );
220
+ // if( hasInvalidValueInArray( checked, check ) ) throw new Error( `Invalid scape value ${ value } TO ${type}` );
221
+ // return new Escape( type, "type", checked[ 0 ], false, false );
222
+ // }
223
+ // export const SQL:EscapeMap= {} as any;
224
+ //
225
+ // [
226
+ // TypeFamilyCollection.Integer,
227
+ // TypeFamilyCollection.Real,
228
+ // ].forEach( collection => {
229
+ // collection.forEach( type => {
230
+ // SQL[ type ] = ( value, variadic )=>{
231
+ // return createEscape(value, type, variadic, original => Number(original), checkIsValidNumber);
232
+ // }
233
+ // });
234
+ // });
235
+ //
236
+ //
237
+ // [
238
+ // TypeFamilyCollection.Text,
239
+ // TypeFamilyCollection.UUID,
240
+ // ].forEach( collection => {
241
+ // collection.forEach( type => {
242
+ // SQL[ type ] = (( value, variadic )=>{
243
+ // return createEscape( value, type, variadic, original => original, arg => typeof arg === "string" );
244
+ // }) as any
245
+ // });
246
+ // });
247
+ //
248
+ //
249
+ //
250
+ // [
251
+ // TypeFamilyCollection.Document,
252
+ // ].forEach( collection => {
253
+ // collection.forEach( type => {
254
+ // SQL[ type ] = (( value, variadic )=>{
255
+ // let escape = createEscape( value, type, variadic, original => original, arg => true );
256
+ // escape.asArray = false;
257
+ // return escape;
258
+ // }) as any
259
+ //
260
+ // SQL[ `${type}_array` ] = (( value, variadic )=>{
261
+ // let escape = createEscape( value, type, variadic, original => original, arg => true );
262
+ // escape.asArray = true;
263
+ // return escape;
264
+ // }) as any
265
+ // });
266
+ // });
267
+ //
268
+ // [
269
+ // TypeFamilyCollection.Time,
270
+ // TypeFamilyCollection.Date,
271
+ // TypeFamilyCollection.DateTime
272
+ // ].forEach( collection => {
273
+ // collection.forEach( type => {
274
+ // SQL[ type ] = ( value, variadic )=>{
275
+ // return createEscape( value, type, variadic, original => original, arg => true );
276
+ // }
277
+ // });
278
+ // });
279
+ //
280
+ // [
281
+ // TypeFamilyCollection.Boolean
282
+ // ].forEach( collection => {
283
+ // collection.forEach( type => {
284
+ // SQL[ type ] =( ( value, variadic )=>{
285
+ // return createEscape( value, type, variadic, original => !!original, arg => true );
286
+ // }) as any
287
+ // });
288
+ // });
289
+ //
290
+ //
291
+ //
292
+ // export function anyNumber( value ){
293
+ // if( Number.isNaN( value ) ) return SQL.numeric( value );
294
+ // let _asReal = ()=>{
295
+ //
296
+ // /*
297
+ // //TODO reforçar outras validação para double precision|real|decimal
298
+ // decimal variable user-specified precision, exact up to 131072 digits before the decimal point; up to 16383 digits after the decimal point
299
+ // numeric variable user-specified precision, exact up to 131072 digits before the decimal point; up to 16383 digits after the decimal point
300
+ // real 4 bytes variable-precision, inexact 6 decimal digits precision
301
+ // double precision 8 bytes variable-precision, inexact 15 decimal digits precision
302
+ // */
303
+ // return SQL.numeric( value );
304
+ // }
305
+ // let _asInteger = ()=>{
306
+ // let _subtype:("numeric"|"integer"|"bigint") & keyof typeof SQL = "integer";
307
+ // /*
308
+ // //TODO reforçar outras validação para smallint|integer|bigint
309
+ // smallint 2 bytes small-range integer -32768 to +32767
310
+ // integer 4 bytes typical choice for integer -2147483648 to +2147483647
311
+ // bigint 8 bytes large-range integer -9223372036854775808 to 9223372036854775807
312
+ // */
313
+ //
314
+ // if( value >= -2147483648 && value <= +2147483647 ) _subtype = "integer";
315
+ // else if( value >= -9223372036854775808 && value <= 9223372036854775807 ) _subtype = "bigint";
316
+ // else _subtype = "numeric";
317
+ // // @ts-ignore
318
+ // return SQL[_subtype]( value );
319
+ // }
320
+ //
321
+ // let parts = `${ value }`.split(".");
322
+ // if( parts.length === 2 ) return _asReal()
323
+ // else return _asInteger();
324
+ //
325
+ // }
326
+ //
327
+ // export function anyObject( value:any ){
328
+ // if( Array.isArray( value ) ) {
329
+ // let _determineType = ( next:any[] )=>{
330
+ // let determined = next.map( element => {
331
+ // if( typeof element === "string" ) return "text";
332
+ // if( typeof element === "boolean" ) return "boolean";
333
+ // if( typeof element === "number" ) return "number";
334
+ // if( !element && typeof element === "object" && !Array.isArray( element ) ) return "jsonb";
335
+ // if( Array.isArray( element ) ) return _determineType( element );
336
+ // }).filter( determined => !!determined );
337
+ // if( determined.length ) return determined[0];
338
+ // return null;
339
+ // };
340
+ //
341
+ // let type = _determineType( value );
342
+ // if( !type ) type = "text";
343
+ // return SQL[type](value);
344
+ // } else return SQL.jsonb( value );
345
+ // }
346
+ //
347
+ //
348
+ //
349
+ // //Any Type Scape
350
+ // SQL["any"]=<T>( value:T )=>{
351
+ // if( value === null || value === undefined ) return SQL.text( value as string );
352
+ // if( typeof value === "string" ) return SQL.text( value );
353
+ // if( typeof value === "boolean" ) return SQL.boolean( value );
354
+ // if( typeof value === "number" ) return anyNumber( value );
355
+ // if( typeof value === "object" ) return anyObject( value );
356
+ // throw new Error( `Valor não esperado para ser tratado ${ value }!` );
357
+ // }
358
+ //
359
+ // //Any Type Scape
360
+ // SQL["anyOf"]=<T>( value:T, format:string )=>{
361
+ // let any = SQL.any( value );
362
+ // any.type = format;
363
+ // return any;
364
+ // }
365
+ //
366
+ //
367
+ // //Special Scape
368
+ // SQL["identifier"]=( value:string )=>{
369
+ // if( !value ) throw new Error( "Invalid Value for Identifier" );
370
+ // return new Escape( null, "identifier", value, false, false );
371
+ // }
372
+ //
373
+ // SQL["unsafe"]=( value:string )=>{
374
+ // return new Escape( null, "unsafe", value, false, false );
375
+ // }
376
+ //
377
+ // SQL["keyword"]=( value:string )=>{
378
+ // return new Escape( null, "keyword", value, false, false );
379
+ // }
380
+ // SQL["literal"]=( value:string )=>{
381
+ // return new Escape( null, "literal", value, false, false );
382
+ // }
59
383
  //# sourceMappingURL=escape.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"escape.js","sourceRoot":"","sources":["escape.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,kBAaC;AACD,kBAGC;AAnCD,uCAAyB;AAEzB,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC3B,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY;IAC7E,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ;IAC/E,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc;IACzE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY;IAC5E,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK;IAC1E,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW;IAC7E,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ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