@payloadcms/db-postgres 0.1.11 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,14 +9,14 @@ Object.defineProperty(exports, "upsertRow", {
9
9
  }
10
10
  });
11
11
  const _drizzleorm = require("drizzle-orm");
12
+ const _errors = require("payload/errors");
13
+ const _utilities = require("payload/utilities");
12
14
  const _buildFindManyArgs = require("../find/buildFindManyArgs");
13
15
  const _read = require("../transform/read");
14
16
  const _write = require("../transform/write");
15
17
  const _deleteExistingArrayRows = require("./deleteExistingArrayRows");
16
18
  const _deleteExistingRowsByPath = require("./deleteExistingRowsByPath");
17
19
  const _insertArrays = require("./insertArrays");
18
- const _errors = require("payload/errors");
19
- const _utilities = require("payload/utilities");
20
20
  const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '', req, tableName, upsertTarget, where })=>{
21
21
  // Split out the incoming data into the corresponding:
22
22
  // base row, locales, relationships, blocks, and arrays
@@ -80,7 +80,9 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
80
80
  if (Object.keys(rowToInsert.selects).length > 0) {
81
81
  Object.entries(rowToInsert.selects).forEach(([selectTableName, selectRows])=>{
82
82
  selectRows.forEach((row)=>{
83
- row.parent = insertedRow.id;
83
+ if (typeof row.parent === 'undefined') {
84
+ row.parent = insertedRow.id;
85
+ }
84
86
  if (!selectsToInsert[selectTableName]) selectsToInsert[selectTableName] = [];
85
87
  selectsToInsert[selectTableName].push(row);
86
88
  });
@@ -153,17 +155,14 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
153
155
  // INSERT BLOCKS
154
156
  // //////////////////////////////////
155
157
  const insertedBlockRows = {};
156
- for (const [blockName, blockRows] of Object.entries(blocksToInsert)){
157
- if (operation === 'update') {
158
- await (0, _deleteExistingRowsByPath.deleteExistingRowsByPath)({
159
- adapter,
160
- db,
161
- parentID: insertedRow.id,
162
- pathColumnName: '_path',
163
- rows: blockRows.map(({ row })=>row),
164
- tableName: `${tableName}_blocks_${blockName}`
165
- });
158
+ if (operation === 'update') {
159
+ for (const blockName of rowToInsert.blocksToDelete){
160
+ const blockTableName = `${tableName}_blocks_${blockName}`;
161
+ const blockTable = adapter.tables[blockTableName];
162
+ await db.delete(blockTable).where((0, _drizzleorm.eq)(blockTable._parentID, insertedRow.id));
166
163
  }
164
+ }
165
+ for (const [blockName, blockRows] of Object.entries(blocksToInsert)){
167
166
  insertedBlockRows[blockName] = await db.insert(adapter.tables[`${tableName}_blocks_${blockName}`]).values(blockRows.map(({ row })=>row)).returning();
168
167
  insertedBlockRows[blockName].forEach((row, i)=>{
169
168
  blockRows[i].row = row;
@@ -258,4 +257,4 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
258
257
  return result;
259
258
  };
260
259
 
261
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91cHNlcnRSb3cvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgVHlwZVdpdGhJRCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGVxIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5cbmltcG9ydCB0eXBlIHsgQmxvY2tSb3dUb0luc2VydCB9IGZyb20gJy4uL3RyYW5zZm9ybS93cml0ZS90eXBlcydcbmltcG9ydCB0eXBlIHsgQXJncyB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGJ1aWxkRmluZE1hbnlBcmdzIH0gZnJvbSAnLi4vZmluZC9idWlsZEZpbmRNYW55QXJncydcbmltcG9ydCB7IHRyYW5zZm9ybSB9IGZyb20gJy4uL3RyYW5zZm9ybS9yZWFkJ1xuaW1wb3J0IHsgdHJhbnNmb3JtRm9yV3JpdGUgfSBmcm9tICcuLi90cmFuc2Zvcm0vd3JpdGUnXG5pbXBvcnQgeyBkZWxldGVFeG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cykubGVuZ3RoID4gMCkge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGJsb2NrUm93LmxvY2FsZXMpLmZvckVhY2goKFtibG9ja0xvY2FsZSwgYmxvY2tMb2NhbGVEYXRhXSkgPT4ge1xuICAgICAgICAgICAgaWYgKE9iamVjdC5rZXlzKGJsb2NrTG9jYWxlRGF0YSkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICBibG9ja0xvY2FsZURhdGEuX3BhcmVudElEID0gYmxvY2tSb3cucm93LmlkXG4gICAgICAgICAgICAgIGJsb2NrTG9jYWxlRGF0YS5fbG9jYWxlID0gYmxvY2tMb2NhbGVcbiAgICAgICAgICAgICAgYWNjLnB1c2goYmxvY2tMb2NhbGVEYXRhKVxuICAgICAgICAgICAgICBibG9ja0xvY2FsZUluZGV4TWFwLnB1c2goaSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGFjY1xuICAgICAgfSwgW10pXG5cbiAgICAgIGlmIChibG9ja0xvY2FsZVJvd3NUb0luc2VydC5sZW5ndGggPiAwKSB7XG4gICAgICAgIGF3YWl0IGRiXG4gICAgICAgICAgLmluc2VydChhZGFwdGVyLnRhYmxlc1tgJHt0YWJsZU5hbWV9X2Jsb2Nrc18ke2Jsb2NrTmFtZX1fbG9jYWxlc2BdKVxuICAgICAgICAgIC52YWx1ZXMoYmxvY2tMb2NhbGVSb3dzVG9JbnNlcnQpXG4gICAgICAgICAgLnJldHVybmluZygpXG4gICAgICB9XG5cbiAgICAgIGF3YWl0IGluc2VydEFycmF5cyh7XG4gICAgICAgIGFkYXB0ZXIsXG4gICAgICAgIGFycmF5czogYmxvY2tSb3dzLm1hcCgoeyBhcnJheXMgfSkgPT4gYXJyYXlzKSxcbiAgICAgICAgZGIsXG4gICAgICAgIHBhcmVudFJvd3M6IGluc2VydGVkQmxvY2tSb3dzW2Jsb2NrTmFtZV0sXG4gICAgICB9KVxuICAgIH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BQU1BLE1BQU1DLElBQUksS0FBSyxVQUNqQixJQUFJQyx1QkFBZSxDQUNqQjtZQUNFO2dCQUNFQyxPQUFPcEYsUUFBUXFGLGdCQUFnQixDQUFDOUUsVUFBVSxDQUFDMEUsTUFBTUssVUFBVSxDQUFDO2dCQUM1REMsU0FBU2pGLElBQUlrRixDQUFDLENBQUM7WUFDakI7U0FDRCxFQUNEbEYsS0FBS2tGLEtBQUtDLElBQUFBLG1CQUFRLEVBQUNuRixJQUFJb0YsT0FBTyxDQUFDQyxNQUFNLENBQUNDLElBQUksRUFBRUosQ0FBQyxJQUUvQ1A7SUFDTjtJQUVBLHFDQUFxQztJQUNyQyw2QkFBNkI7SUFDN0IscUNBQXFDO0lBRXJDLE1BQU1ZLGVBQWVDLElBQUFBLG9DQUFpQixFQUFDO1FBQ3JDOUY7UUFDQStGLE9BQU87UUFDUDVGO1FBQ0FJO0lBQ0Y7SUFFQXNGLGFBQWFwRixLQUFLLEdBQUcwQyxJQUFBQSxjQUFFLEVBQUNuRCxRQUFRYyxNQUFNLENBQUNQLFVBQVUsQ0FBQ1IsRUFBRSxFQUFFYSxZQUFZYixFQUFFO0lBRXBFLE1BQU1pRyxNQUFNLE1BQU05RixHQUFHK0YsS0FBSyxDQUFDMUYsVUFBVSxDQUFDMkYsU0FBUyxDQUFDTDtJQUVoRCxxQ0FBcUM7SUFDckMsaUJBQWlCO0lBQ2pCLHFDQUFxQztJQUVyQyxNQUFNTSxTQUFTQyxJQUFBQSxlQUFTLEVBQUk7UUFDMUJULFFBQVEzRixRQUFRMEYsT0FBTyxDQUFDQyxNQUFNO1FBQzlCMUYsTUFBTStGO1FBQ043RjtJQUNGO0lBRUEsT0FBT2dHO0FBQ1QifQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-postgres",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
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": "1.0.0",
28
- "payload": "2.0.14"
28
+ "payload": "2.1.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "payload": "^2.0.0"