prostgles-server 3.0.135 → 3.0.137
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/JSONBValidation/validate_jsonb_schema_sql.d.ts.map +1 -1
- package/dist/JSONBValidation/validate_jsonb_schema_sql.js +9 -2
- package/dist/JSONBValidation/validate_jsonb_schema_sql.js.map +1 -1
- package/lib/JSONBValidation/validate_jsonb_schema_sql.d.ts.map +1 -1
- package/lib/JSONBValidation/validate_jsonb_schema_sql.js +9 -2
- package/lib/JSONBValidation/validate_jsonb_schema_sql.ts +9 -2
- package/package.json +1 -1
- package/tests/client/PID.txt +1 -1
- package/tests/server/package-lock.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate_jsonb_schema_sql.d.ts","sourceRoot":"","sources":["../../lib/JSONBValidation/validate_jsonb_schema_sql.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,yBAAmC,CAAC;AACzE,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"validate_jsonb_schema_sql.d.ts","sourceRoot":"","sources":["../../lib/JSONBValidation/validate_jsonb_schema_sql.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,yBAAmC,CAAC;AACzE,eAAO,MAAM,yBAAyB,QA6crC,CAAC"}
|
|
@@ -31,6 +31,7 @@ DECLARE
|
|
|
31
31
|
"type": { "enum": ["data", "data-def"] },
|
|
32
32
|
"table": "string",
|
|
33
33
|
"column": "string",
|
|
34
|
+
"lookup": { "type": "any", "optional": true },
|
|
34
35
|
"isArray": { "type": "boolean", "optional": true },
|
|
35
36
|
"filter": { "optional": true, "type": "any" },
|
|
36
37
|
"isFullRow": { "optional": true, "type": {
|
|
@@ -46,6 +47,7 @@ DECLARE
|
|
|
46
47
|
"type": { "enum": ["schema"] },
|
|
47
48
|
"object": { "enum": ["table", "column"] },
|
|
48
49
|
"isArray": { "type": "boolean", "optional": true },
|
|
50
|
+
"lookup": { "type": "any", "optional": true },
|
|
49
51
|
"filter": { "optional": true, "type": "any" }
|
|
50
52
|
}
|
|
51
53
|
$d$;
|
|
@@ -108,6 +110,12 @@ BEGIN
|
|
|
108
110
|
END IF;
|
|
109
111
|
|
|
110
112
|
ELSIF schema ? 'lookup' THEN
|
|
113
|
+
|
|
114
|
+
/* TODO: Finish validating data-def */
|
|
115
|
+
IF (schema->'lookup'->>'type' = 'data-def') THEN
|
|
116
|
+
RETURN TRUE;
|
|
117
|
+
END IF;
|
|
118
|
+
|
|
111
119
|
/* Validate lookup schema */
|
|
112
120
|
IF NOT ${exports.VALIDATE_SCHEMA_FUNCNAME}(
|
|
113
121
|
'{ "oneOfType": [' || concat_ws(',',lookup_data_def_schema, lookup_schema_schema) || '] }',
|
|
@@ -118,7 +126,6 @@ BEGIN
|
|
|
118
126
|
RETURN FALSE;
|
|
119
127
|
END IF;
|
|
120
128
|
|
|
121
|
-
|
|
122
129
|
RETURN ${exports.VALIDATE_SCHEMA_FUNCNAME}(
|
|
123
130
|
CASE WHEN schema->'lookup'->>'type' = 'data-def' THEN
|
|
124
131
|
lookup_data_def_schema
|
|
@@ -307,7 +314,7 @@ BEGIN
|
|
|
307
314
|
|
|
308
315
|
END LOOP;
|
|
309
316
|
|
|
310
|
-
RAISE EXCEPTION '
|
|
317
|
+
RAISE EXCEPTION 'No oneOf schemas matching ( % ), %', v_one_of_errors, path;-- USING HINT = path, COLUMN = colname;
|
|
311
318
|
|
|
312
319
|
/* arrayOfType: { key_name: { type: "string" } } */
|
|
313
320
|
ELSIF (schema ? 'arrayOf' OR schema ? 'arrayOfType') THEN
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate_jsonb_schema_sql.js","sourceRoot":"","sources":["../../lib/JSONBValidation/validate_jsonb_schema_sql.ts"],"names":[],"mappings":";;;AAAA,kEAA+D;AAGlD,QAAA,wBAAwB,GAAG,uBAAgC,CAAC;AAC5D,QAAA,yBAAyB,GAAG;;;I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xB,gCAAwB;SACxB,gCAAwB;SACxB,gCAAwB;;SAExB,gCAAwB;SACxB,gCAAwB;;;SAGxB,gCAAwB;CAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate_jsonb_schema_sql.d.ts","sourceRoot":"","sources":["validate_jsonb_schema_sql.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,yBAAmC,CAAC;AACzE,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"validate_jsonb_schema_sql.d.ts","sourceRoot":"","sources":["validate_jsonb_schema_sql.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,yBAAmC,CAAC;AACzE,eAAO,MAAM,yBAAyB,QA6crC,CAAC"}
|
|
@@ -31,6 +31,7 @@ DECLARE
|
|
|
31
31
|
"type": { "enum": ["data", "data-def"] },
|
|
32
32
|
"table": "string",
|
|
33
33
|
"column": "string",
|
|
34
|
+
"lookup": { "type": "any", "optional": true },
|
|
34
35
|
"isArray": { "type": "boolean", "optional": true },
|
|
35
36
|
"filter": { "optional": true, "type": "any" },
|
|
36
37
|
"isFullRow": { "optional": true, "type": {
|
|
@@ -46,6 +47,7 @@ DECLARE
|
|
|
46
47
|
"type": { "enum": ["schema"] },
|
|
47
48
|
"object": { "enum": ["table", "column"] },
|
|
48
49
|
"isArray": { "type": "boolean", "optional": true },
|
|
50
|
+
"lookup": { "type": "any", "optional": true },
|
|
49
51
|
"filter": { "optional": true, "type": "any" }
|
|
50
52
|
}
|
|
51
53
|
$d$;
|
|
@@ -108,6 +110,12 @@ BEGIN
|
|
|
108
110
|
END IF;
|
|
109
111
|
|
|
110
112
|
ELSIF schema ? 'lookup' THEN
|
|
113
|
+
|
|
114
|
+
/* TODO: Finish validating data-def */
|
|
115
|
+
IF (schema->'lookup'->>'type' = 'data-def') THEN
|
|
116
|
+
RETURN TRUE;
|
|
117
|
+
END IF;
|
|
118
|
+
|
|
111
119
|
/* Validate lookup schema */
|
|
112
120
|
IF NOT ${exports.VALIDATE_SCHEMA_FUNCNAME}(
|
|
113
121
|
'{ "oneOfType": [' || concat_ws(',',lookup_data_def_schema, lookup_schema_schema) || '] }',
|
|
@@ -118,7 +126,6 @@ BEGIN
|
|
|
118
126
|
RETURN FALSE;
|
|
119
127
|
END IF;
|
|
120
128
|
|
|
121
|
-
|
|
122
129
|
RETURN ${exports.VALIDATE_SCHEMA_FUNCNAME}(
|
|
123
130
|
CASE WHEN schema->'lookup'->>'type' = 'data-def' THEN
|
|
124
131
|
lookup_data_def_schema
|
|
@@ -307,7 +314,7 @@ BEGIN
|
|
|
307
314
|
|
|
308
315
|
END LOOP;
|
|
309
316
|
|
|
310
|
-
RAISE EXCEPTION '
|
|
317
|
+
RAISE EXCEPTION 'No oneOf schemas matching ( % ), %', v_one_of_errors, path;-- USING HINT = path, COLUMN = colname;
|
|
311
318
|
|
|
312
319
|
/* arrayOfType: { key_name: { type: "string" } } */
|
|
313
320
|
ELSIF (schema ? 'arrayOf' OR schema ? 'arrayOfType') THEN
|
|
@@ -30,6 +30,7 @@ DECLARE
|
|
|
30
30
|
"type": { "enum": ["data", "data-def"] },
|
|
31
31
|
"table": "string",
|
|
32
32
|
"column": "string",
|
|
33
|
+
"lookup": { "type": "any", "optional": true },
|
|
33
34
|
"isArray": { "type": "boolean", "optional": true },
|
|
34
35
|
"filter": { "optional": true, "type": "any" },
|
|
35
36
|
"isFullRow": { "optional": true, "type": {
|
|
@@ -45,6 +46,7 @@ DECLARE
|
|
|
45
46
|
"type": { "enum": ["schema"] },
|
|
46
47
|
"object": { "enum": ["table", "column"] },
|
|
47
48
|
"isArray": { "type": "boolean", "optional": true },
|
|
49
|
+
"lookup": { "type": "any", "optional": true },
|
|
48
50
|
"filter": { "optional": true, "type": "any" }
|
|
49
51
|
}
|
|
50
52
|
$d$;
|
|
@@ -107,6 +109,12 @@ BEGIN
|
|
|
107
109
|
END IF;
|
|
108
110
|
|
|
109
111
|
ELSIF schema ? 'lookup' THEN
|
|
112
|
+
|
|
113
|
+
/* TODO: Finish validating data-def */
|
|
114
|
+
IF (schema->'lookup'->>'type' = 'data-def') THEN
|
|
115
|
+
RETURN TRUE;
|
|
116
|
+
END IF;
|
|
117
|
+
|
|
110
118
|
/* Validate lookup schema */
|
|
111
119
|
IF NOT ${VALIDATE_SCHEMA_FUNCNAME}(
|
|
112
120
|
'{ "oneOfType": [' || concat_ws(',',lookup_data_def_schema, lookup_schema_schema) || '] }',
|
|
@@ -117,7 +125,6 @@ BEGIN
|
|
|
117
125
|
RETURN FALSE;
|
|
118
126
|
END IF;
|
|
119
127
|
|
|
120
|
-
|
|
121
128
|
RETURN ${VALIDATE_SCHEMA_FUNCNAME}(
|
|
122
129
|
CASE WHEN schema->'lookup'->>'type' = 'data-def' THEN
|
|
123
130
|
lookup_data_def_schema
|
|
@@ -306,7 +313,7 @@ BEGIN
|
|
|
306
313
|
|
|
307
314
|
END LOOP;
|
|
308
315
|
|
|
309
|
-
RAISE EXCEPTION '
|
|
316
|
+
RAISE EXCEPTION 'No oneOf schemas matching ( % ), %', v_one_of_errors, path;-- USING HINT = path, COLUMN = colname;
|
|
310
317
|
|
|
311
318
|
/* arrayOfType: { key_name: { type: "string" } } */
|
|
312
319
|
ELSIF (schema ? 'arrayOf' OR schema ? 'arrayOfType') THEN
|
package/package.json
CHANGED
package/tests/client/PID.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
22421
|