@payloadcms/db-postgres 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"buildQuery.d.ts","sourceRoot":"","sources":["../../src/queries/buildQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAK5E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,GAAG,CAAA;IACd,KAAK,EAAE,YAAY,CAAA;CACpB,EAAE,CAAA;AAEH,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,OAAO,EAAE;QACP,MAAM,EAAE,aAAa,CAAA;QACrB,KAAK,EAAE,OAAO,GAAG,GAAG,OAAO,IAAI,CAAA;KAChC,CAAA;IACD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AACD,QAAA,MAAM,UAAU,wEAOb,cAAc,KAAG,QAAQ,MAAM,CAyEjC,CAAA;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"buildQuery.d.ts","sourceRoot":"","sources":["../../src/queries/buildQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAK5E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,GAAG,CAAA;IACd,KAAK,EAAE,YAAY,CAAA;CACpB,EAAE,CAAA;AAEH,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,OAAO,EAAE;QACP,MAAM,EAAE,aAAa,CAAA;QACrB,KAAK,EAAE,OAAO,GAAG,GAAG,OAAO,IAAI,CAAA;KAChC,CAAA;IACD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AACD,QAAA,MAAM,UAAU,wEAOb,cAAc,KAAG,QAAQ,MAAM,CA8EjC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -30,19 +30,24 @@ const buildQuery = async function buildQuery({ adapter, fields, locale, sort, ta
30
30
  sortPath = sort;
31
31
  orderBy.order = _drizzleorm.asc;
32
32
  }
33
- const { columnName: sortTableColumnName, table: sortTable } = (0, _getTableColumnFromPath.getTableColumnFromPath)({
34
- adapter,
35
- collectionPath: sortPath,
36
- fields,
37
- joinAliases,
38
- joins,
39
- locale,
40
- pathSegments: sortPath.replace(/__/g, '.').split('.'),
41
- selectFields,
42
- tableName
43
- });
44
- orderBy.column = sortTable[sortTableColumnName];
45
- } else {
33
+ try {
34
+ const { columnName: sortTableColumnName, table: sortTable } = (0, _getTableColumnFromPath.getTableColumnFromPath)({
35
+ adapter,
36
+ collectionPath: sortPath,
37
+ fields,
38
+ joinAliases,
39
+ joins,
40
+ locale,
41
+ pathSegments: sortPath.replace(/__/g, '.').split('.'),
42
+ selectFields,
43
+ tableName
44
+ });
45
+ orderBy.column = sortTable?.[sortTableColumnName];
46
+ } catch (err) {
47
+ // continue
48
+ }
49
+ }
50
+ if (!orderBy?.column) {
46
51
  orderBy.order = _drizzleorm.desc;
47
52
  const createdAt = adapter.tables[tableName]?.createdAt;
48
53
  if (createdAt) {
@@ -77,4 +82,4 @@ const buildQuery = async function buildQuery({ adapter, fields, locale, sort, ta
77
82
  };
78
83
  const _default = buildQuery;
79
84
 
80
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL2J1aWxkUXVlcnkudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBTUUwgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHsgRmllbGQsIFdoZXJlIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgYXNjLCBkZXNjIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5cbmltcG9ydCB0eXBlIHsgR2VuZXJpY0NvbHVtbiwgR2VuZXJpY1RhYmxlLCBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi90eXBlcydcblxuaW1wb3J0IHsgZ2V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HLGdCQUFJO1FBQ3BCLE1BQU1ZLFlBQVk3QixRQUFRUyxNQUFNLENBQUNMLFVBQVUsRUFBRXlCO1FBRTdDLElBQUlBLFdBQVc7WUFDYmpCLFFBQVFDLE1BQU0sR0FBR2dCO1FBQ25CLE9BQU87WUFDTGpCLFFBQVFDLE1BQU0sR0FBR2IsUUFBUVMsTUFBTSxDQUFDTCxVQUFVLENBQUNJLEVBQUU7UUFDL0M7SUFDRjtJQUVBLElBQUlJLFFBQVFDLE1BQU0sRUFBRTtRQUNsQk4sYUFBYUosSUFBSSxHQUFHUyxRQUFRQyxNQUFNO0lBQ3BDO0lBRUEsSUFBSVI7SUFFSixJQUFJQyxpQkFBaUJ3QixPQUFPQyxJQUFJLENBQUN6QixlQUFlMEIsTUFBTSxHQUFHLEdBQUc7UUFDMUQzQixRQUFRLE1BQU00QixJQUFBQSx3QkFBVyxFQUFDO1lBQ3hCakM7WUFDQUM7WUFDQVU7WUFDQUQ7WUFDQVI7WUFDQUs7WUFDQUg7WUFDQUMsT0FBT0M7UUFDVDtJQUNGO0lBRUEsT0FBTztRQUNMSztRQUNBRDtRQUNBRTtRQUNBTDtRQUNBRjtJQUNGO0FBQ0Y7TUFFQSxXQUFlTiJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-postgres",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "The officially supported Postgres database adapter for Payload",
5
5
  "repository": "https://github.com/payloadcms/payload",
6
6
  "license": "MIT",
@@ -26,7 +26,7 @@
26
26
  "@types/pg": "8.10.2",
27
27
  "@types/to-snake-case": "1.0.0",
28
28
  "@payloadcms/eslint-config": "1.0.0",
29
- "payload": "2.3.0"
29
+ "payload": "2.4.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "payload": "^2.0.0"