@payloadcms/db-postgres 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/find/findMany.d.ts.map +1 -1
- package/dist/find/findMany.js +4 -3
- package/dist/queries/parseParams.d.ts.map +1 -1
- package/dist/queries/parseParams.js +11 -5
- package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
- package/dist/queries/sanitizeQueryValue.js +10 -5
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"findMany.d.ts","sourceRoot":"","sources":["../../src/find/findMany.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAA8B,MAAM,eAAe,CAAA;AAItE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ/C,KAAK,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG;IACzC,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,QAAQ,iHAYlB,IAAI;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"findMany.d.ts","sourceRoot":"","sources":["../../src/find/findMany.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAA8B,MAAM,eAAe,CAAA;AAItE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ/C,KAAK,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG;IACzC,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,QAAQ,iHAYlB,IAAI;;;;;;;;;;;EA8KN,CAAA"}
|
package/dist/find/findMany.js
CHANGED
@@ -21,7 +21,7 @@ function _interop_require_default(obj) {
|
|
21
21
|
const findMany = async function find({ adapter, fields, limit: limitArg, locale, page = 1, pagination, req = {}, skip, sort, tableName, where: whereArg }) {
|
22
22
|
const db = adapter.sessions[req.transactionID]?.db || adapter.drizzle;
|
23
23
|
const table = adapter.tables[tableName];
|
24
|
-
let limit = limitArg;
|
24
|
+
let limit = limitArg ?? 10;
|
25
25
|
let totalDocs;
|
26
26
|
let totalPages;
|
27
27
|
let hasPrevPage;
|
@@ -119,7 +119,8 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
|
|
119
119
|
findManyArgs.where = (0, _drizzleorm.inArray)(adapter.tables[tableName].id, Object.keys(orderedIDMap));
|
120
120
|
} else {
|
121
121
|
findManyArgs.limit = limitArg === 0 ? undefined : limitArg;
|
122
|
-
|
122
|
+
const offset = skip || (page - 1) * limitArg;
|
123
|
+
if (!Number.isNaN(offset)) findManyArgs.offset = offset;
|
123
124
|
if (where) {
|
124
125
|
findManyArgs.where = where;
|
125
126
|
}
|
@@ -195,4 +196,4 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
|
|
195
196
|
};
|
196
197
|
};
|
197
198
|
|
198
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maW5kL2ZpbmRNYW55LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZEFyZ3MgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBGaWVsZCwgUGF5bG9hZFJlcXVlc3QsIFR5cGVXaXRoSUQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBpbkFycmF5LCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9t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.ts","sourceRoot":"","sources":["../../src/queries/parseParams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAY,KAAK,EAAE,MAAM,eAAe,CAAA;AAM3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAS1E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,
|
1
|
+
{"version":3,"file":"parseParams.d.ts","sourceRoot":"","sources":["../../src/queries/parseParams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAY,KAAK,EAAE,MAAM,eAAe,CAAA;AAM3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAS1E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CA6KrB"}
|
@@ -117,22 +117,28 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
|
|
117
117
|
constraints.push((0, _drizzleorm.and)(...val.split(' ').map((word)=>(0, _drizzleorm.ilike)(table[columnName], `%${word}%`))));
|
118
118
|
break;
|
119
119
|
}
|
120
|
-
const
|
120
|
+
const sanitizedQueryValue = (0, _sanitizeQueryValue.sanitizeQueryValue)({
|
121
121
|
field,
|
122
122
|
operator,
|
123
123
|
relationOrPath,
|
124
124
|
val
|
125
125
|
});
|
126
|
+
if (sanitizedQueryValue === null) {
|
127
|
+
break;
|
128
|
+
}
|
129
|
+
const { operator: queryOperator, value: queryValue } = sanitizedQueryValue;
|
126
130
|
if (queryOperator === 'not_equals' && queryValue !== null) {
|
127
131
|
constraints.push((0, _drizzleorm.or)((0, _drizzleorm.isNull)(rawColumn || table[columnName]), /* eslint-disable @typescript-eslint/no-explicit-any */ (0, _drizzleorm.ne)(rawColumn || table[columnName], queryValue)));
|
128
|
-
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
if ((field.type === 'relationship' || field.type === 'upload') && Array.isArray(queryValue) && operator === 'not_in') {
|
129
135
|
constraints.push((0, _drizzleorm.sql)`${(0, _drizzleorm.notInArray)(table[columnName], queryValue)} OR
|
130
136
|
${table[columnName]}
|
131
137
|
IS
|
132
138
|
NULL`);
|
133
|
-
|
134
|
-
constraints.push(_operatorMap.operatorMap[queryOperator](rawColumn || table[columnName], queryValue));
|
139
|
+
break;
|
135
140
|
}
|
141
|
+
constraints.push(_operatorMap.operatorMap[queryOperator](rawColumn || table[columnName], queryValue));
|
136
142
|
}
|
137
143
|
}
|
138
144
|
}
|
@@ -153,4 +159,4 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
|
|
153
159
|
return result;
|
154
160
|
}
|
155
161
|
|
156
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3BhcnNlUGFyYW1zLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgU1FMIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgdHlwZSB7IEZpZWxkLCBPcGVyYXRvciwgV2hlcmUgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBhbmQsIGlsaWtlLCBpc05vdE51bGwsIGlzTnVsbCwgbmUsIG5vdEluQXJyYXksIG9yLCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7IFF1ZXJ5RXJyb3IgfSBmcm9tICdwYXlsb2FkL2Vycm9ycydcbmltcG9ydCB7IHZhbGlkT3BlcmF0b3JzIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHR5cGUgeyBHZW5lcmljQ29sdW1uLCBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi90eXBlcydcbmltcG9ydCB0eXBlIHsgQnVpbGRRdWVyeUpvaW5BbGlhc2VzLCBCdWlsZFF1ZXJ5Sm9pbnMgfSBmcm9tICcuL2J1aWxkUXVlcnknXG5cbmltcG9ydCB7IGJ1aWxkQW5kT3JDb25kaXRpb25zIH0gZnJvbSAnLi9idWlsZEFuZE9yQ29uZGl0aW9ucydcbmltc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9PT0gJ29iamVjdCcgJiYgT2JqZWN0LmtleXMod2hlcmUpLmxlbmd0aCA+IDApIHtcbiAgICAvLyBXZSBuZWVkIHRvIGRldGVybWluZSBpZiB0aGUgd2hlcmVLZXkgaXMgYW4gQU5ELCBPUiwgb3IgYSBzY2hlbWEgcGF0aFxuICAgIGZvciAoY29uc3QgcmVsYXRpb25PclBhdGggb2YgT2JqZWN0LmtleXMod2hlcmUpKSB7XG4gICAgICBpZiAocmVsYXRpb25PclBhdGgpIHtcbiAgICAgICAgY29uc3QgY29uZGl0aW9uID0gd2hlcmVbcmVsYXRpb25PclBhdGhdXG4gICAgICAgIGxldCBjb25kaXRpb25PcGVyYXRvcjogJ2FuZCcgfCAnb3InXG4gICAgICAgIGlmIChyZWxhdGlvbk9yUGF0aC50b0xvd2VyQ2FzZSgpID09PSAnYW5kJykge1xuICAgICAgICAgIGNvbmRpdGlvbk9wZXJhdG9yID0gJ2FuZCdcbiAgICAgICAgfSBlbHNlIGlmIChyZWxhdGlvbk9yUGF0aC50b0xvd2VyQ2FzZSgpID09PSAnb3InKSB7XG4gICAgICAgICAgY29uZGl0aW9uT3BlcmF0b3IgPSAnb3InXG4gICAgICAgIH1cbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoY29uZGl0aW9uKSkge1xuICAgICAgICAgIGNvbnN0IGJ1aWx0Q29uZGl0aW9ucyA9IGF3YWl0IGJ1aWxkQW5kT3JDb25kaXRpb25zKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgdGFibGVOYW1lLFxuICAgICAgICAgICAgd2hlcmU6IGNvbmRpdGlvbixcbiAgICAgICAgICB9KVxuICAgICAgICAgIGlmIChidWlsdENvbmRpdGlvbnMubGV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nRzOiBxdWVyeUNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSxcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgIHJhd0NvbHVtbixcbiAgICAgICAgICAgICAgICAgIHRhYmxlLFxuICAgICAgICAgICAgICAgIH0gPSBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aDogcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiByZWxhdGlvbk9yUGF0aC5yZXBsYWNlKC9fXy9nLCAnLicpLnNwbGl0KCcuJyksXG4gICAgICAgICAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVtvcGVyYXRvcl1cblxuICAgICAgICAgICAgICAgIHF1ZXJ5Q29uc3RyYWludHMuZm9yRWFjaCgoeyBjb2x1bW5OYW1lOiBjb2wsIHRhYmxlOiBjb25zdHJhaW50VGFibGUsIHZhbHVlIH0pID0+IHtcbiAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnICYmIHZhbHVlLmluZGV4T2YoJyUnKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2gob3BlcmF0b3JNYXAubGlrZShjb25zdHJhaW50VGFibGVbY29sXSwgdmFsdWUpKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChvcGVyYXRvck1hcC5lcXVhbHMoY29uc3RyYWludFRhYmxlW2NvbF0sIHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKFsnanNvbicsICdyaWNoVGV4dCddLmluY2x1ZGVzKGZpZWxkLnR5cGUpICYmIEFycmF5LmlzQXJyYXkocGF0aFNlZ21lbnRzKSkge1xuICAgICAgICAgICAgICAgICAgY29uc3Qgc2VnbWVudHMgPSBwYXRoU2VnbWVudHMuc2xpY2UoMSlcbiAgICAgICAgICAgICAgICAgIHNlZ21lbnRzLnVuc2hpZnQodGFibGVbY29sdW1uTmFtZV0ubmFtZSlcblxuICAgICAgICAgICAgICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdyaWNoVGV4dCcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QganNvblF1ZXJ5ID0gY3JlYXRlSlNPTlF1ZXJ5KHtcbiAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcixcbiAgICAgICAgICAgICAgICAgICAgICBwYXRoU2VnbWVudHM6IHNlZ21lbnRzLFxuICAgICAgICAgICAgICAgICAgICAgIHRyZWF0QXNBcnJheTogWydjaGlsZHJlbiddLFxuICAgICAgICAgICAgICAgICAgICAgIHRyZWF0Um9vdEFzQXJyYXk6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbCxcbiAgICAgICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHNxbC5yYXcoanNvblF1ZXJ5KSlcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdqc29uJykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBqc29uUXVlcnkgPSBjb252ZXJ0UGF0aFRvSlNPTlRyYXZlcnNhbChwYXRoU2VnbWVudHMpXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goc3FsLnJhdyhgJHt0YWJsZVtjb2x1bW5OYW1lXS5uYW1lfSR7anNvblF1ZXJ5fSA9ICclJHt2YWx9JSdgKSlcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbHVtbk5hbWUgPSBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSh2YWwpXG4gICAgICAgICAgICAgICAgICBpZiAoY29sdW1uTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKGlzTm90TnVsbCh0YWJsZVtjb2x1bW5OYW1lXSkpXG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUXVlcnlFcnJvcihbeyBwYXRoOiByZWxhdGlvbk9yUGF0aCB9XSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKG9wZXJhdG9yID09PSAnbGlrZScpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIGFuZCguLi52YWwuc3BsaXQoJyAnKS5tYXAoKHdvcmQpID0+IGlsaWtlKHRhYmxlW2NvbHVtbk5hbWVdLCBgJSR7d29yZH0lYCkpKSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3QgeyBvcGVyYXRvcjogcXVlcnlPcGVyYXRvciwgdmFsdWU6IHF1ZXJ5VmFsdWUgfSA9IHNhbml0aXplUXVlcnlWYWx1ZSh7XG4gICAgICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yLFxuICAgICAgICAgICAgICAgICAgcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICB2YWwsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChxdWVyeU9wZXJhdG9yID09PSAnbm90X2VxdWFscycgJiYgcXVlcnlWYWx1ZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgb3IoXG4gICAgICAgICAgICAgICAgICAgICAgaXNOdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSksXG4gICAgICAgICAgICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgICAgICAgICAgIG5lPGFueT4ocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKSxcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgKGZpZWxkLnR5cGUgPT09ICdyZWxhdGlvbnNoaXAnIHx8IGZpZWxkLnR5cGUgPT09ICd1cGxvYWQnKSAmJlxuICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShxdWVyeVZhbHVlKSAmJlxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPT09ICdub3RfaW4nXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBzcWxgJHtub3RJbkFycmF5KHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKX0gT1JcbiAgICAgICAgICAgICAgICAgICAgJHt0YWJsZVtjb2x1bW5OYW1lXX1cbiAgICAgICAgICAgICAgICAgICAgSVNcbiAgICAgICAgICAgICAgICAgICAgTlVMTGAsXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yTWFwW3F1ZXJ5T3BlcmF0b3JdKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSksXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG4gIGlmIChjb25zdHJhaW50cy5sZW5ndGggPiAwKSB7XG4gICAgaWYgKHJlc3VsdCkge1xuICAgICAgcmVzdWx0ID0gYW5kKHJlc3VsdCwgLi4uY29uc3RyYWludHMpXG4gICAgfSBlbHNlIHtcbiAgICAgIHJlc3VsdCA9IGFuZCguLi5jb25zdHJhaW50cylcbiAgICB9XG4gIH1cbiAgaWYgKGNvbnN0cmFpbnRzLmxlbmd0aCA9PT0gMSAmJiAhcmVzdWx0KSB7XG4gICAgO1tyZXN1bHRdID0gY29uc3RyYWludHNcbiAgfVxuXG4gIHJldHVybiByZXN1bHRcbn1cbiJdLCJuYW1lcyI6WyJwYXJzZVBhcmFtcyIsImFkYXB0ZXIiLCJmaWVsZHMiLCJqb2luQWxpYXNlcyIsImpvaW5zIiwibG9jYWxlIiwic2VsZWN0RmllbGRzIiwidGFib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2FzZSgpID09PSAnb3InKSB7XG4gICAgICAgICAgY29uZGl0aW9uT3BlcmF0b3IgPSAnb3InXG4gICAgICAgIH1cbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoY29uZGl0aW9uKSkge1xuICAgICAgICAgIGNvbnN0IGJ1aWx0Q29uZGl0aW9ucyA9IGF3YWl0IGJ1aWxkQW5kT3JDb25kaXRpb25zKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgdGFibGVOYW1lLFxuICAgICAgICAgICAgd2hlcmU6IGNvbmRpdGlvbixcbiAgICAgICAgICB9KVxuICAgICAgICAgIGlmIChidWlsdENvbmRpdGlvbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xuICAgICAgICAgICAgICByZXN1bHQgPSBvcGVyYXRvck1hcFtjb25kaXRpb25PcGVyYXRvcl0ocmVzdWx0LCAuLi5idWlsdENvbmRpdGlvbnMpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHQgPSBvcGVyYXRvck1hcFtjb25kaXRpb25PcGVyYXRvcl0oLi4uYnVpbHRDb25kaXRpb25zKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvLyBJdCdzIGEgcGF0aCAtIGFuZCB0aGVyZSBjYW4gYmUgbXVsdGlwbGUgY29tcGFyaXNvbnMgb24gYSBzaW5nbGUgcGF0aC5cbiAgICAgICAgICAvLyBGb3IgZXhhbXBsZSAtIHRpdGxlIGxpa2UgJ3Rlc3QnIGFuZCB0aXRsZSBub3QgZXF1YWwgdG8gJ3Rlc3RlcidcbiAgICAgICAgICAvLyBTbyB3ZSBuZWVkIHRvIGxvb3Agb24ga2V5cyBhZ2FpbiBoZXJlIHRvIGhhbmRsZSBlYWNoIG9wZXJhdG9yIGluZGVwZW5kZW50bHlcbiAgICAgICAgICBjb25zdCBwYXRoT3BlcmF0b3JzID0gd2hlcmVbcmVsYXRpb25PclBhdGhdXG4gICAgICAgICAgaWYgKHR5cGVvZiBwYXRoT3BlcmF0b3JzID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgZm9yIChjb25zdCBvcGVyYXRvciBvZiBPYmplY3Qua2V5cyhwYXRoT3BlcmF0b3JzKSkge1xuICAgICAgICAgICAgICBpZiAodmFsaWRPcGVyYXRvcnMuaW5jbHVkZXMob3BlcmF0b3IgYXMgT3BlcmF0b3IpKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgY29sdW1uTmFtZSxcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzOiBxdWVyeUNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSxcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgIHJhd0NvbHVtbixcbiAgICAgICAgICAgICAgICAgIHRhYmxlLFxuICAgICAgICAgICAgICAgIH0gPSBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aDogcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiByZWxhdGlvbk9yUGF0aC5yZXBsYWNlKC9fXy9nLCAnLicpLnNwbGl0KCcuJyksXG4gICAgICAgICAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVtvcGVyYXRvcl1cblxuICAgICAgICAgICAgICAgIHF1ZXJ5Q29uc3RyYWludHMuZm9yRWFjaCgoeyBjb2x1bW5OYW1lOiBjb2wsIHRhYmxlOiBjb25zdHJhaW50VGFibGUsIHZhbHVlIH0pID0+IHtcbiAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnICYmIHZhbHVlLmluZGV4T2YoJyUnKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2gob3BlcmF0b3JNYXAubGlrZShjb25zdHJhaW50VGFibGVbY29sXSwgdmFsdWUpKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChvcGVyYXRvck1hcC5lcXVhbHMoY29uc3RyYWludFRhYmxlW2NvbF0sIHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKFsnanNvbicsICdyaWNoVGV4dCddLmluY2x1ZGVzKGZpZWxkLnR5cGUpICYmIEFycmF5LmlzQXJyYXkocGF0aFNlZ21lbnRzKSkge1xuICAgICAgICAgICAgICAgICAgY29uc3Qgc2VnbWVudHMgPSBwYXRoU2VnbWVudHMuc2xpY2UoMSlcbiAgICAgICAgICAgICAgICAgIHNlZ21lbnRzLnVuc2hpZnQodGFibGVbY29sdW1uTmFtZV0ubmFtZSlcblxuICAgICAgICAgICAgICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdyaWNoVGV4dCcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QganNvblF1ZXJ5ID0gY3JlYXRlSlNPTlF1ZXJ5KHtcbiAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcixcbiAgICAgICAgICAgICAgICAgICAgICBwYXRoU2VnbWVudHM6IHNlZ21lbnRzLFxuICAgICAgICAgICAgICAgICAgICAgIHRyZWF0QXNBcnJheTogWydjaGlsZHJlbiddLFxuICAgICAgICAgICAgICAgICAgICAgIHRyZWF0Um9vdEFzQXJyYXk6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbCxcbiAgICAgICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHNxbC5yYXcoanNvblF1ZXJ5KSlcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdqc29uJykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBqc29uUXVlcnkgPSBjb252ZXJ0UGF0aFRvSlNPTlRyYXZlcnNhbChwYXRoU2VnbWVudHMpXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goc3FsLnJhdyhgJHt0YWJsZVtjb2x1bW5OYW1lXS5uYW1lfSR7anNvblF1ZXJ5fSA9ICclJHt2YWx9JSdgKSlcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbHVtbk5hbWUgPSBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSh2YWwpXG4gICAgICAgICAgICAgICAgICBpZiAoY29sdW1uTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKGlzTm90TnVsbCh0YWJsZVtjb2x1bW5OYW1lXSkpXG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUXVlcnlFcnJvcihbeyBwYXRoOiByZWxhdGlvbk9yUGF0aCB9XSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKG9wZXJhdG9yID09PSAnbGlrZScpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIGFuZCguLi52YWwuc3BsaXQoJyAnKS5tYXAoKHdvcmQpID0+IGlsaWtlKHRhYmxlW2NvbHVtbk5hbWVdLCBgJSR7d29yZH0lYCkpKSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3Qgc2FuaXRpemVkUXVlcnlWYWx1ZSA9IHNhbml0aXplUXVlcnlWYWx1ZSh7XG4gICAgICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yLFxuICAgICAgICAgICAgICAgICAgcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICB2YWwsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChzYW5pdGl6ZWRRdWVyeVZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHsgb3BlcmF0b3I6IHF1ZXJ5T3BlcmF0b3IsIHZhbHVlOiBxdWVyeVZhbHVlIH0gPSBzYW5pdGl6ZWRRdWVyeVZhbHVlXG5cbiAgICAgICAgICAgICAgICBpZiAocXVlcnlPcGVyYXRvciA9PT0gJ25vdF9lcXVhbHMnICYmIHF1ZXJ5VmFsdWUgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIG9yKFxuICAgICAgICAgICAgICAgICAgICAgIGlzTnVsbChyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0pLFxuICAgICAgICAgICAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgICAgICAgICAgICBuZTxhbnk+KHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIChmaWVsZC50eXBlID09PSAncmVsYXRpb25zaGlwJyB8fCBmaWVsZC50eXBlID09PSAndXBsb2FkJykgJiZcbiAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkocXVlcnlWYWx1ZSkgJiZcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yID09PSAnbm90X2luJ1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgc3FsYCR7bm90SW5BcnJheSh0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSl9IE9SXG4gICAgICAgICAgICAgICAgICAgICR7dGFibGVbY29sdW1uTmFtZV19XG4gICAgICAgICAgICAgICAgICAgIElTXG4gICAgICAgICAgICAgICAgICAgIE5VTExgLFxuICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cbl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04sV0FBVyxDQUFDOzt3QkFFaEIsQ0FBQztvQ0FHUDtnQ0FDRjtnQ0FFQWpCLFlBQVlrQyxJQUFJLENBQ2R0Qix3QkFBVyxDQUFDOEMsY0FBYyxDQUFDcEMsYUFBYUMsS0FBSyxDQUFDTixXQUFXLEVBQUUwQzs0QkFFL0Q7d0JBQ0Y7b0JBQ0Y7Z0JBQ0Y7WUFDRjtRQUNGO0lBQ0Y7SUFDQSxJQUFJM0QsWUFBWUcsTUFBTSxHQUFHLEdBQUc7UUFDMUIsSUFBSUosUUFBUTtZQUNWQSxTQUFTcUQsSUFBQUEsZUFBRyxFQUFDckQsV0FBV0M7UUFDMUIsT0FBTztZQUNMRCxTQUFTcUQsSUFBQUEsZUFBRyxLQUFJcEQ7UUFDbEI7SUFDRjtJQUNBLElBQUlBLFlBQVlHLE1BQU0sS0FBSyxLQUFLLENBQUNKLFFBQVE7UUFDdEMsQ0FBQ0EsT0FBTyxHQUFHQztJQUNkO0lBRUEsT0FBT0Q7QUFDVCJ9
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sanitizeQueryValue.d.ts","sourceRoot":"","sources":["../../src/queries/sanitizeQueryValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAoB,MAAM,eAAe,CAAA;AAG7E,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,eAAO,MAAM,kBAAkB,2DAK5B,sBAAsB;cAAe,MAAM;WAAS,OAAO;
|
1
|
+
{"version":3,"file":"sanitizeQueryValue.d.ts","sourceRoot":"","sources":["../../src/queries/sanitizeQueryValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAoB,MAAM,eAAe,CAAA;AAG7E,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,eAAO,MAAM,kBAAkB,2DAK5B,sBAAsB;cAAe,MAAM;WAAS,OAAO;CAmF7D,CAAA"}
|
@@ -38,10 +38,15 @@ const sanitizeQueryValue = ({ field, operator: operatorArg, relationOrPath, val
|
|
38
38
|
'all',
|
39
39
|
'in',
|
40
40
|
'not_in'
|
41
|
-
].includes(operator)
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
].includes(operator)) {
|
42
|
+
if (typeof formattedValue === 'string') {
|
43
|
+
formattedValue = (0, _utilities.createArrayFromCommaDelineated)(formattedValue);
|
44
|
+
if (field.type === 'number') {
|
45
|
+
formattedValue = formattedValue.map((arrayVal)=>parseFloat(arrayVal));
|
46
|
+
}
|
47
|
+
}
|
48
|
+
if (!Array.isArray(formattedValue) || formattedValue.length === 0) {
|
49
|
+
return null;
|
45
50
|
}
|
46
51
|
}
|
47
52
|
if (field.type === 'number' && typeof formattedValue === 'string') {
|
@@ -87,4 +92,4 @@ const sanitizeQueryValue = ({ field, operator: operatorArg, relationOrPath, val
|
|
87
92
|
};
|
88
93
|
};
|
89
94
|
|
90
|
-
//# sourceMappingURL=data:application/json;base64,
|
95
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3Nhbml0aXplUXVlcnlWYWx1ZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBUElFcnJvciB9IGZyb20gJ3BheWxvYWQvZXJyb3JzJ1xuaW1wb3J0IHsgdHlwZSBGaWVsZCwgdHlwZSBUYWJBc0ZpZWxkLCBmaWVsZEFmZmVjdHNEYXRhIH0gZnJvbSAncGF5bG9hZC90eX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Q3hDO0lBRUEsSUFBSUosYUFBYSxVQUFVO1FBQ3pCSSxpQkFBaUJBLG1CQUFtQixVQUFVQSxtQkFBbUI7UUFDakUsSUFBSUEsbUJBQW1CLE9BQU87WUFDNUJKLFdBQVc7UUFDYjtJQUNGO0lBRUEsT0FBTztRQUFFQTtRQUFVTSxPQUFPRjtJQUFlO0FBQzNDIn0=
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@payloadcms/db-postgres",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.8",
|
4
4
|
"description": "The officially supported Postgres database adapter for Payload",
|
5
5
|
"repository": "https://github.com/payloadcms/payload",
|
6
6
|
"license": "MIT",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"@types/pg": "8.10.2",
|
26
26
|
"@types/to-snake-case": "1.0.0",
|
27
27
|
"@payloadcms/eslint-config": "0.0.1",
|
28
|
-
"payload": "2.0.
|
28
|
+
"payload": "2.0.7"
|
29
29
|
},
|
30
30
|
"publishConfig": {
|
31
31
|
"registry": "https://registry.npmjs.org/"
|