@payloadcms/db-postgres 0.8.0 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/dist/connect.js +1 -1
  2. package/dist/count.d.ts +3 -0
  3. package/dist/count.d.ts.map +1 -0
  4. package/dist/count.js +65 -0
  5. package/dist/create.d.ts.map +1 -1
  6. package/dist/create.js +9 -6
  7. package/dist/createGlobal.d.ts.map +1 -1
  8. package/dist/createGlobal.js +9 -6
  9. package/dist/createGlobalVersion.d.ts.map +1 -1
  10. package/dist/createGlobalVersion.js +11 -10
  11. package/dist/createMigration.js +1 -1
  12. package/dist/createVersion.d.ts.map +1 -1
  13. package/dist/createVersion.js +22 -21
  14. package/dist/deleteMany.d.ts.map +1 -1
  15. package/dist/deleteMany.js +8 -6
  16. package/dist/deleteOne.d.ts.map +1 -1
  17. package/dist/deleteOne.js +3 -6
  18. package/dist/deleteVersions.d.ts.map +1 -1
  19. package/dist/deleteVersions.js +8 -7
  20. package/dist/destroy.js +1 -1
  21. package/dist/find/buildFindManyArgs.js +1 -1
  22. package/dist/find/chainMethods.js +1 -1
  23. package/dist/find/findMany.js +1 -1
  24. package/dist/find/traverseFields.d.ts.map +1 -1
  25. package/dist/find/traverseFields.js +13 -22
  26. package/dist/find.d.ts.map +1 -1
  27. package/dist/find.js +8 -6
  28. package/dist/findGlobal.d.ts.map +1 -1
  29. package/dist/findGlobal.js +8 -6
  30. package/dist/findGlobalVersions.d.ts.map +1 -1
  31. package/dist/findGlobalVersions.js +8 -7
  32. package/dist/findOne.d.ts.map +1 -1
  33. package/dist/findOne.js +8 -6
  34. package/dist/findVersions.d.ts.map +1 -1
  35. package/dist/findVersions.js +8 -7
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +8 -8
  38. package/dist/init.d.ts.map +1 -1
  39. package/dist/init.js +10 -8
  40. package/dist/migrate.js +1 -1
  41. package/dist/migrateDown.js +1 -1
  42. package/dist/migrateFresh.js +1 -1
  43. package/dist/migrateRefresh.js +1 -1
  44. package/dist/migrateReset.js +1 -1
  45. package/dist/migrateStatus.js +1 -1
  46. package/dist/queries/buildAndOrConditions.js +1 -1
  47. package/dist/queries/buildQuery.js +1 -1
  48. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.js +1 -1
  49. package/dist/queries/createJSONQuery/formatJSONPathSegment.js +1 -1
  50. package/dist/queries/createJSONQuery/index.js +1 -1
  51. package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
  52. package/dist/queries/getTableColumnFromPath.js +12 -41
  53. package/dist/queries/operatorMap.js +1 -1
  54. package/dist/queries/parseParams.js +2 -2
  55. package/dist/queries/sanitizeQueryValue.js +1 -1
  56. package/dist/queries/selectDistinct.js +1 -1
  57. package/dist/queryDrafts.d.ts.map +1 -1
  58. package/dist/queryDrafts.js +8 -7
  59. package/dist/schema/build.d.ts +4 -3
  60. package/dist/schema/build.d.ts.map +1 -1
  61. package/dist/schema/build.js +86 -45
  62. package/dist/schema/createIndex.js +1 -1
  63. package/dist/schema/{getTableName.d.ts → createTableName.d.ts} +5 -7
  64. package/dist/schema/createTableName.d.ts.map +1 -0
  65. package/dist/schema/createTableName.js +43 -0
  66. package/dist/schema/idToUUID.js +1 -1
  67. package/dist/schema/parentIDColumnMap.js +1 -1
  68. package/dist/schema/setColumnID.js +1 -1
  69. package/dist/schema/traverseFields.d.ts.map +1 -1
  70. package/dist/schema/traverseFields.js +43 -23
  71. package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +1 -1
  72. package/dist/schema/validateExistingBlockIsIdentical.js +4 -4
  73. package/dist/transactions/beginTransaction.js +1 -1
  74. package/dist/transactions/commitTransaction.js +1 -1
  75. package/dist/transactions/rollbackTransaction.js +1 -1
  76. package/dist/transform/read/hasManyNumber.js +1 -1
  77. package/dist/transform/read/hasManyText.d.ts +2 -2
  78. package/dist/transform/read/hasManyText.d.ts.map +1 -1
  79. package/dist/transform/read/hasManyText.js +2 -2
  80. package/dist/transform/read/index.js +3 -3
  81. package/dist/transform/read/relationship.js +1 -1
  82. package/dist/transform/read/traverseFields.js +1 -1
  83. package/dist/transform/write/array.d.ts +2 -2
  84. package/dist/transform/write/array.d.ts.map +1 -1
  85. package/dist/transform/write/array.js +4 -4
  86. package/dist/transform/write/blocks.js +2 -2
  87. package/dist/transform/write/index.js +5 -5
  88. package/dist/transform/write/numbers.js +1 -1
  89. package/dist/transform/write/relationships.js +1 -1
  90. package/dist/transform/write/selects.js +1 -1
  91. package/dist/transform/write/texts.js +3 -3
  92. package/dist/transform/write/traverseFields.d.ts.map +1 -1
  93. package/dist/transform/write/traverseFields.js +6 -15
  94. package/dist/transform/write/types.d.ts +1 -1
  95. package/dist/transform/write/types.d.ts.map +1 -1
  96. package/dist/transform/write/types.js +1 -1
  97. package/dist/types.d.ts +3 -6
  98. package/dist/types.d.ts.map +1 -1
  99. package/dist/types.js +1 -1
  100. package/dist/update.d.ts.map +1 -1
  101. package/dist/update.js +3 -6
  102. package/dist/updateGlobal.d.ts.map +1 -1
  103. package/dist/updateGlobal.js +8 -6
  104. package/dist/updateGlobalVersion.d.ts.map +1 -1
  105. package/dist/updateGlobalVersion.js +3 -7
  106. package/dist/updateVersion.d.ts.map +1 -1
  107. package/dist/updateVersion.js +3 -7
  108. package/dist/upsertRow/deleteExistingArrayRows.js +1 -1
  109. package/dist/upsertRow/deleteExistingRowsByPath.js +1 -1
  110. package/dist/upsertRow/index.js +3 -3
  111. package/dist/upsertRow/insertArrays.js +2 -2
  112. package/dist/upsertRow/types.js +1 -1
  113. package/dist/utilities/appendPrefixToKeys.js +1 -1
  114. package/dist/utilities/createBlocksMap.js +1 -1
  115. package/dist/utilities/createMigrationTable.js +1 -1
  116. package/dist/utilities/createRelationshipMap.js +1 -1
  117. package/dist/utilities/hasLocalesTable.js +1 -1
  118. package/dist/utilities/isArrayOfRows.js +1 -1
  119. package/dist/utilities/migrationTableExists.js +1 -1
  120. package/dist/utilities/parseError.js +1 -1
  121. package/package.json +2 -2
  122. package/dist/schema/getTableName.d.ts.map +0 -1
  123. package/dist/schema/getTableName.js +0 -43
@@ -69,4 +69,4 @@ const buildFindManyArgs = ({ adapter, depth, fields, tableName })=>{
69
69
  return result;
70
70
  };
71
71
 
72
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maW5kL2J1aWxkRmluZE1hbnlBcmdzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgREJRdWVyeUNvbmZpZyB9IGZyb20gJ2RyaXp6bGUtb3JtJ1xuaW1wb3J0IHR5cGUgeyBGaWVsZCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi4vdHlwZXMnXG5cbmltcG9ydCB7IHRyYXZlcnNlRmllbGRzIH0gZnJvbSAnLi90cmF2ZXJzZUZpZWxkcydcblxudHlwZSBCdWlsZEZpbmRRdWVyeUFyZ3MgPSB7XG4gIGFkYXB0ZXI6IFBvc3RncmVzQWRhcHRlclxuICBkZXB0aDogbnVtYmVyXG4gIGZpZWxkczogRmllbGRbXVxuICB0YWJsZU5hbWU6IHN0cmluZ1xufVxuXG5leHBvcnQgdHlwZSBSZXN1bHQgPSBEQlF1ZXJ5Q29uZmlnPCdtYW55JywgdHJ1ZSwgYW55LCBhbnk+XG5cbi8vIEdlbmVyYXRlIHRoZSBEcml6emxlIHF1ZXJ5IGZvciBmaW5kTWFueSBiYXNlZCBvblxuLy8gYSBjb2xsZWN0aW9uIGZpZWxkIHN0cnVjdHVyZVxuZXhwb3J0IGNvbnN0IGJ1aWxkRmluZE1hbnlBcmdzID0gKHtcbiAgYWRhcHRlcixcbiAgZGVwdGgsXG4gIGZpZWxkcyxcbiAgdGFibGVOYW1lLFxufTogQnVpbGRGaW5kUXVlcnlBcmdzKTogUmVjb3JkPHN0cmluZywgdW5rbm93bj4gPT4ge1xuICBjb25zdCByZXN1bHQ6IFJlc3VsdC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TyxFQUFFRSxJQUFJLEVBQUVDLE1BQU0sRUFBRTtRQUM1QyxPQUFPSCxLQUFLLENBQUNHLE9BQU8sSUFBSUQ7SUFDMUIsR0FBR0Y7QUFDTCJ9
@@ -175,4 +175,4 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
175
175
  };
176
176
  };
177
177
 
178
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maW5kL2ZpbmRNYW55LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZEFyZ3MgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBGaWVsZCwgUGF5bG9hZFJlcXVlc3QsIFR5cGVXaXRoSUQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBpbkFycmF5LCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi90eXBlcydcbmltcG9ydCB0eXBlIHsgQ2hhaW5lZE1ldGhvZHMgfSBmcm9tICcuL2NoYWluTWV0aG9kcydcblxuaW1wb3J0IGJ1aWxkUXVlcnkgZnJvbSAnLi4vcXVlcmllcy9idWlsZFF1ZXJ5J1xuaW1wb3J0IHsgc2VsZWN0RGlzdGluY3QgfSBmcm9tICcuLi9xdWVyaWVzL3NlbGVjdERpc3RpbmN0J1xuaW1wb3J0IHsgdHJhbnNmb3JtIH0gZnJvbSAnLi4vdHJhbnNmb3JtL3JlYWQnXG5pbXBvcnQgeyBidWlsZEZpbmRNYW55QXJncyB9IGZyb20gJy4vYnVpbGRGaW5kTWFueUFyZ3MnXG5pbXBvcnQgeyBjaGFpbk1ldGhvZHMgfSBmcm9tICcuL2NoYWluTWV0aG9kcydcblxudHlwZSBBcmdzID0gT21pdDxGaW5kQXJncywgJ2Nvb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@@ -9,7 +9,12 @@ Object.defineProperty(exports, "traverseFields", {
9
9
  }
10
10
  });
11
11
  const _types = require("payload/types");
12
- const _getTableName = require("../schema/getTableName");
12
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
13
18
  const traverseFields = ({ _locales, adapter, currentArgs, currentTableName, depth, fields, path, topLevelArgs, topLevelTableName })=>{
14
19
  fields.forEach((field)=>{
15
20
  if (field.type === 'collapsible' || field.type === 'row') {
@@ -56,19 +61,8 @@ const traverseFields = ({ _locales, adapter, currentArgs, currentTableName, dept
56
61
  ],
57
62
  with: {}
58
63
  };
59
- const arrayTableName = (0, _getTableName.getTableName)({
60
- adapter,
61
- config: field,
62
- parentTableName: currentTableName,
63
- prefix: `${currentTableName}_${path}`
64
- });
65
- const arrayTableNameWithLocales = (0, _getTableName.getTableName)({
66
- adapter,
67
- config: field,
68
- locales: true,
69
- parentTableName: currentTableName,
70
- prefix: `${currentTableName}_${path}`
71
- });
64
+ const arrayTableName = adapter.tableNameMap.get(`${currentTableName}_${path}${(0, _tosnakecase.default)(field.name)}`);
65
+ const arrayTableNameWithLocales = `${arrayTableName}${adapter.localesSuffix}`;
72
66
  if (adapter.tables[arrayTableNameWithLocales]) withArray.with._locales = _locales;
73
67
  currentArgs.with[`${path}${field.name}`] = withArray;
74
68
  traverseFields({
@@ -114,13 +108,10 @@ const traverseFields = ({ _locales, adapter, currentArgs, currentTableName, dept
114
108
  ],
115
109
  with: {}
116
110
  };
117
- const tableName = (0, _getTableName.getTableName)({
118
- adapter,
119
- config: block,
120
- parentTableName: topLevelTableName,
121
- prefix: `${topLevelTableName}_blocks_`
122
- });
123
- if (adapter.tables[`${tableName}${adapter.localesSuffix}`]) withBlock.with._locales = _locales;
111
+ const tableName = adapter.tableNameMap.get(`${topLevelTableName}_blocks_${(0, _tosnakecase.default)(block.slug)}`);
112
+ if (adapter.tables[`${tableName}${adapter.localesSuffix}`]) {
113
+ withBlock.with._locales = _locales;
114
+ }
124
115
  topLevelArgs.with[blockKey] = withBlock;
125
116
  traverseFields({
126
117
  _locales,
@@ -159,4 +150,4 @@ const traverseFields = ({ _locales, adapter, currentArgs, currentTableName, dept
159
150
  return topLevelArgs;
160
151
  };
161
152
 
162
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maW5kL3RyYXZlcnNlRmllbGRzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEZpZWxkIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgZmllbGRBZmZlY3RzRGF0YSwgdGFiSGFzTmFtZSB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi4vdHlwZXMnXG5pbXBvcnQgdHlwZSB7IFJlc3VsdCB9IGZyb20gJy4vYnVpbGRGaW5kTWFueUFyZ3MnXG5cbmltcG9ydCB7IGdldFRhYmxlTmFtZSB9IGZyb20gJy4uL3NjaGVtYS9nZXRUYWJsZU5hbWUnXG5cbnR5cGUgVHJhdmVyc2VGaWVsZEFyZ3MgPSB7XG4gIF9sb2NhbGVzOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPlxuICBhZGFwdGVyOiBQb3N0Z3Jlc0FkYXB0ZXJcbiAgY3VycmVudEFyZ3M6IFJlY29yZDxzdHJpbmcsIHVua25vd24+XG4gIGN1cnJlbnRUYWJsZU5hbWU6IHN0cmluZ1xuICBkZXB0aD86IG51bWJlclxuICBmaWVsZHM6IEZpZWxkW11cbiAgcGF0aDogc3RyaW5nXG4gIHRvcExldmVsQXJnczogUmVjb3JkPHN0cmluZywgdW5rbm93bj5c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Y3VycmVudFRhYmxlTmFtZSxcbiAgICAgICAgICBkZXB0aCxcbiAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgcGF0aDogdGFiUGF0aCxcbiAgICAgICAgICB0b3BMZXZlbEFyZ3MsXG4gICAgICAgICAgdG9wTGV2ZWxUYWJsZU5hbWUsXG4gICAgICAgIH0pXG4gICAgICB9KVxuXG4gICAgICByZXR1cm5cbiAgICB9XG5cbiAgICBpZiAoZmllbGRBZmZlY3RzRGF0YShmaWVsZCkpIHtcbiAgICAgIHN3aXRjaCAoZmllbGQudHlwZSkge1xuICAgICAgICBjYXNlICdhcnJheSc6IHtcbiAgICAgICAgICBjb25zdCB3aXRoQXJyYXk6IFJlc3VsdCA9IHtcbiAgICAgICAgICAgIGNvbHVtbnM6IHtcbiAgICAgICAgICAgICAgX3BhcmVudElEOiBmYWxzZSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvcmRlckJ5OiAoeyBfb3JkZXIgfSwgeyBhc2MgfSkgPT4gW2FzYyhfb3JkZXIpXSxcbiAgICAgICAgICAgIHdpdGg6IHt9LFxuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnN0IGFycmF5VGFibGVOYW1lID0gZ2V0VGFibGVOYW1lKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBjb25maWc6IGZpZWxkLFxuICAgICAgICAgICAgcGFyZW50VGFibGVOYW1lOiBjdXJyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgcHJlZml4OiBgJHtjdXJyZW50VGFibGVOYW1lfV8ke3BhdGh9YCxcbiAgICAgICAgICB9KVxuXG4gICAgICAgICAgY29uc3QgYXJyYXlUYWJsZU5hbWVXaXRoTG9jYWxlcyA9IGdldFRhYmxlTmFtZSh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgY29uZmlnOiBmaWVsZCxcbiAgICAgICAgICAgIGxvY2FsZXM6IHRydWUsXG4gICAgICAgICAgICBwYXJlbnRUYWJsZU5hbWU6IGN1cnJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgICBwcmVmaXg6IGAke2N1cnJlbnRUYWJsZU5hbWV9XyR7cGF0aH1gLFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBpZiAoYWRhcHRlci50YWJsZXNbYXJyYXlUYWJsZU5hbWVXaXRoTG9jYWxlc10pIHdpdGhBcnJheS53aXRoLl9sb2NhbGVzID0gX2xvY2FsZXNcbiAgICAgICAgICBjdXJyZW50QXJncy53aXRoW2Ake3BhdGh9JHtmaWVsZC5uYW1lfWBdID0gd2l0aEFycmF5XG5cbiAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICBfbG9jYWxlcyxcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBjdXJyZW50QXJnczogd2l0aEFycmF5LFxuICAgICAgICAgICAgY3VycmVudFRhYmxlTmFtZTogYXJyYXlUYWJsZU5hbWUsXG4gICAgICAgICAgICBkZXB0aCxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgcGF0aDogJycsXG4gICAgICAgICAgICB0b3BMZXZlbEFyZ3MsXG4gICAgICAgICAgICB0b3BMZXZlbFRhYmxlTmFtZSxcbiAgICAgICAgICB9KVxuXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgJ3NlbGVjdCc6IHtcbiAgICAgICAgICBpZiAoZmllbGQuaGFzTWFueSkge1xuICAgICAgICAgICAgY29uc3Qgd2l0aFNlbGVjdDogUmVzdWx0ID0ge1xuICAgICAgICAgICAgICBjb2x1bW5zOiB7XG4gICAgICAgICAgICAgICAgaWQ6IGZhbHNlLFxuICAgICAgICAgICAgICAgIG9yZGVyOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBwYXJlbnQ6IGZhbHNlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBvcmRlckJ5OiAoeyBvcmRlciB9LCB7IGFzYyB9KSA9PiBbYXNjKG9yZGVyKV0sXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGN1cnJlbnRBcmdzLndpdGhbYCR7cGF0aH0ke2ZpZWxkLm5hbWV9YF0gPSB3aXRoU2VsZWN0XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgJ2Jsb2Nrcyc6XG4gICAgICAgICAgZmllbGQuYmxvY2tzLmZvckVhY2goKGJsb2NrKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBibG9ja0tleSA9IGBfYmxvY2tzXyR7YmxvY2suc2x1Z31gXG5cbiAgICAgICAgICAgIGlmICghdG9wTGV2ZWxBcmdzW2Jsb2NrS2V5XSkge1xuICAgICAgICAgICAgICBjb25zdCB3aXRoQmxvY2s6IFJlc3VsdCA9IHtcbiAgICAgICAgICAgICAgICBjb2x1bW5zOiB7XG4gICAgICAgICAgICAgICAgICBfcGFyZW50SUQ6IGZhbHNlLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb3JkZXJCeTogKHsgX29yZGVyIH0sIHsgYXNjIH0pID0+IFthc2MoX29yZGVyKV0sXG4gICAgICAgICAgICAgICAgd2l0aDoge30sXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBjb25zdCB0YWJsZU5hbWUgPSBnZXRUYWJsZU5hbWUoe1xuICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgY29uZmlnOiBibG9jayxcbiAgICAgICAgICAgICAgICBwYXJlbnRUYWJsZU5hbWU6IHRvcExldmVsVGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIHByZWZpeDogYCR7dG9wTGV2ZWxUYWJsZU5hbWV9X2Jsb2Nrc19gLFxuICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgIGlmIChhZGFwdGVyLnRhYmxlc1tgJHt0YWJsZU5hbWV9JHthZGFwdGVyLmxvY2FsZXNTdWZmaXh9YF0pXG4gICAgICAgICAgICAgICAgd2l0aEJsb2NrLndpdGguX2xvY2FsZXMgPSBfbG9jYWxlc1xuICAgICAgICAgICAgICB0b3BMZXZlbEFyZ3Mud2l0aFtibG9ja0tleV0gPSB3aXRoQmxvY2tcblxuICAgICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgICAgX2xvY2FsZXMsXG4gICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICBjdXJyZW50QXJnczogd2l0aEJsb2NrLFxuICAgICAgICAgICAgICAgIGN1cnJlbnRUYWJsZU5hbWU6IHRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICBkZXB0aCxcbiAgICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgICBwYXRoOiAnJyxcbiAgICAgICAgICAgICAgICB0b3BMZXZlbEFyZ3MsXG4gICAgICAgICAgICAgICAgdG9wTGV2ZWxUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcblxuICAgICAgICAgIGJyZWFrXG5cbiAgICAgICAgY2FzZSAnZ3JvdXAnOlxuICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgIF9sb2NhbGVzLFxuICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgIGN1cnJlbnRBcmdzLFxuICAgICAgICAgICAgY3VycmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgIGRlcHRoLFxuICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICBwYXRoOiBgJHtwYXRofSR7ZmllbGQubmFtZX1fYCxcbiAgICAgICAgICAgIHRvcExldmVsQXJncyxcbiAgICAgICAgICAgIHRvcExldmVsVGFibGVOYW1lLFxuICAgICAgICAgI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iAgICAgICAgZGVwdGgsXG4gICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICBwYXRoLFxuICAgICAgICB0b3BMZXZlbEFyZ3MsXG4gICAgICAgIHRvcExldmVsVGFibGVOYW1lLFxuICAgICAgfSlcblxuICAgICAgcmV0dXJuXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkLnR5cGUgPT09ICd0YWJzJykge1xuICAgICAgZmllbGQudGFicy5mb3JFYWNoKCh0YWIpID0+IHtcbiAgICAgICAgY29uc3QgdGFiUGF0aCA9IHRhYkhhc05hbWUodGFiKSA/IGAke3BhdGh9JHt0YWIubmFtZX1fYCA6IHBhdGhcblxuICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgX2xvY2FsZXMsXG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBjdXJyZW50QXJncyxcbiAgICAgICAgICBjdXJyZW50VGFibGVOYW1lLFxuICAgICAgICAgIGRlcHRoLFxuICAgICAgICAgIGZpZWxkczogdGFiLmZpZWxkcyxcbiAgICAgICAgICBwYXRoOiB0YWJQYXRoLFxuICAgICAgICAgIHRvcExldmVsQXJncyxcbiAgICAgICAgICB0b3BMZXZlbFRhYmxlTmFtZSxcbiAgICAgICAgfSlcbiAgICAgIH0pXG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZEFmZmVjdHNEYXRhKGZpZWxkKSkge1xuICAgICAgc3dpdGNoIChmaWVsZC50eXBlKSB7XG4gICAgICAgIGNhc2UgJ2FycmF5Jzoge1xuICAgICAgICAgIGNvbnN0IHdpdGhBcnJheTogUmVzdWx0ID0ge1xuICAgICAgICAgICAgY29sdW1uczoge1xuICAgICAgICAgICAgICBfcGFyZW50SUQ6IGZhbHNlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9yZGVyQnk6ICh7IF9vcmRlciB9LCB7IGFzYyB9KSA9PiBbYXNjKF9vcmRlcildLFxuICAgICAgICAgICAgd2l0aDoge30sXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29uc3QgYXJyYXlUYWJsZU5hbWUgPSBhZGFwdGVyLnRhYmxlTmFtZU1hcC5nZXQoXG4gICAgICAgICAgICBgJHtjdXJyZW50VGFibGVOYW1lfV8ke3BhdGh9JHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1gLFxuICAgICAgICAgIClcblxuICAgICAgICAgIGNvbnN0IGFycmF5VGFibGVOYW1lV2l0aExvY2FsZXMgPSBgJHthcnJheVRhYmxlTmFtZX0ke2FkYXB0ZXIubG9jYWxlc1N1ZmZpeH1gXG5cbiAgICAgICAgICBpZiAoYWRhcHRlci50YWJsZXNbYXJyYXlUYWJsZU5hbWVXaXRoTG9jYWxlc10pIHdpdGhBcnJheS53aXRoLl9sb2NhbGVzID0gX2xvY2FsZXNcbiAgICAgICAgICBjdXJyZW50QXJncy53aXRoW2Ake3BhdGh9JHtmaWVsZC5uYW1lfWBdID0gd2l0aEFycmF5XG5cbiAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICBfbG9jYWxlcyxcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBjdXJyZW50QXJnczogd2l0aEFycmF5LFxuICAgICAgICAgICAgY3VycmVudFRhYmxlTmFtZTogYXJyYXlUYWJsZU5hbWUsXG4gICAgICAgICAgICBkZXB0aCxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgcGF0aDogJycsXG4gICAgICAgICAgICB0b3BMZXZlbEFyZ3MsXG4gICAgICAgICAgICB0b3BMZXZlbFRhYmxlTmFtZSxcbiAgICAgICAgICB9KVxuXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgJ3NlbGVjdCc6IHtcbiAgICAgICAgICBpZiAoZmllbGQuaGFzTWFueSkge1xuICAgICAgICAgICAgY29uc3Qgd2l0aFNlbGVjdDogUmVzdWx0ID0ge1xuICAgICAgICAgICAgICBjb2x1bW5zOiB7XG4gICAgICAgICAgICAgICAgaWQ6IGZhbHNlLFxuICAgICAgICAgICAgICAgIG9yZGVyOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBwYXJlbnQ6IGZhbHNlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBvcmRlckJ5OiAoeyBvcmRlciB9LCB7IGFzYyB9KSA9PiBbYXNjKG9yZGVyKV0sXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGN1cnJlbnRBcmdzLndpdGhbYCR7cGF0aH0ke2ZpZWxkLm5hbWV9YF0gPSB3aXRoU2VsZWN0XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgJ2Jsb2Nrcyc6XG4gICAgICAgICAgZmllbGQuYmxvY2tzLmZvckVhY2goKGJsb2NrKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBibG9ja0tleSA9IGBfYmxvY2tzXyR7YmxvY2suc2x1Z31gXG5cbiAgICAgICAgICAgIGlmICghdG9wTGV2ZWxBcmdzW2Jsb2NrS2V5XSkge1xuICAgICAgICAgICAgICBjb25zdCB3aXRoQmxvY2s6IFJlc3VsdCA9IHtcbiAgICAgICAgICAgICAgICBjb2x1bW5zOiB7XG4gICAgICAgICAgICAgICAgICBfcGFyZW50SUQ6IGZhbHNlLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb3JkZXJCeTogKHsgX29yZGVyIH0sIHsgYXNjIH0pID0+IFthc2MoX29yZGVyKV0sXG4gICAgICAgICAgICAgICAgd2l0aDoge30sXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBjb25zdCB0YWJsZU5hbWUgPSBhZGFwdGVyLnRhYmxlTmFtZU1hcC5nZXQoXG4gICAgICAgICAgICAgICAgYCR7dG9wTGV2ZWxUYWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWAsXG4gICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgICBpZiAoYWRhcHRlci50YWJsZXNbYCR7dGFibGVOYW1lfSR7YWRhcHRlci5sb2NhbGVzU3VmZml4fWBdKSB7XG4gICAgICAgICAgICAgICAgd2l0aEJsb2NrLndpdGguX2xvY2FsZXMgPSBfbG9jYWxlc1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHRvcExldmVsQXJncy53aXRoW2Jsb2NrS2V5XSA9IHdpdGhCbG9ja1xuXG4gICAgICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgICAgICBfbG9jYWxlcyxcbiAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgIGN1cnJlbnRBcmdzOiB3aXRoQmxvY2ssXG4gICAgICAgICAgICAgICAgY3VycmVudFRhYmxlTmFtZTogdGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGRlcHRoLFxuICAgICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICAgIHBhdGg6ICcnLFxuICAgICAgICAgICAgICAgIHRvcExldmVsQXJncyxcbiAgICAgICAgICAgICAgICB0b3BMZXZlbFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuXG4gICAgICAgICAgYnJlYWtcblxuICAgICAgICBjYXNlICdncm91cCc6XG4gICAgICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgICAgX2xvY2FsZXMsXG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgY3VycmVudEFyZ3MsXG4gICAgICAgICAgICBjdXJyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgZGVwdGgsXG4gICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgIHBhdGg6IGAke3BhdGh9JH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JDLE1BQU07Z0NBQ05DO2dDQUNBQzs0QkFDRjt3QkFDRjtvQkFDRjtvQkFFQTtnQkFFRixLQUFLO29CQUNIVCxlQUFlO3dCQUNiQzt3QkFDQUM7d0JBQ0FDO3dCQUNBQzt3QkFDQUM7d0JBQ0FDLFFBQVFLLE1BQU1MLE1BQU07d0JBQ3BCQyxNQUFNLENBQUMsRUFBRUEsS0FBSyxFQUFFSSxNQUFNTSxJQUFJLENBQUMsQ0FBQyxDQUFDO3dCQUM3QlQ7d0JBQ0FDO29CQUNGO29CQUVBO2dCQUVGO29CQUFTO3dCQUNQO29CQUNGO1lBQ0Y7UUFDRjtJQUNGO0lBRUEsT0FBT0Q7QUFDVCJ9
@@ -1 +1 @@
1
- {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../src/find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAQ5C,eAAO,MAAM,IAAI,EAAE,IAgClB,CAAA"}
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../src/find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAS5C,eAAO,MAAM,IAAI,EAAE,IA8BlB,CAAA"}
package/dist/find.js CHANGED
@@ -8,15 +8,17 @@ Object.defineProperty(exports, "find", {
8
8
  return find;
9
9
  }
10
10
  });
11
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
11
12
  const _findMany = require("./find/findMany");
12
- const _getTableName = require("./schema/getTableName");
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
13
18
  const find = async function find({ collection, limit, locale, page = 1, pagination, req = {}, sort: sortArg, where }) {
14
19
  const collectionConfig = this.payload.collections[collection].config;
15
20
  const sort = typeof sortArg === 'string' ? sortArg : collectionConfig.defaultSort;
16
- const tableName = (0, _getTableName.getTableName)({
17
- adapter: this,
18
- config: collectionConfig
19
- });
21
+ const tableName = this.tableNameMap.get((0, _tosnakecase.default)(collectionConfig.slug));
20
22
  return (0, _findMany.findMany)({
21
23
  adapter: this,
22
24
  fields: collectionConfig.fields,
@@ -31,4 +33,4 @@ const find = async function find({ collection, limit, locale, page = 1, paginati
31
33
  });
32
34
  };
33
35
 
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyBmaW5kTWFueSB9IGZyb20gJy4vZmluZC9maW5kTWFueSdcbmltcG9ydCB7IGdldFRhYmxlTmFtZSB9IGZyb20gJy4vc2NoZW1hL2dldFRhYmxlTmFtZSdcblxuZXhwb3J0IGNvbnN0IGZpbmQ6IEZpbmQgPSBhc3luYyBmdW5jdGlvbiBmaW5kKFxuICB0aGlzOiBQb3N0Z3Jlc0FkYXB0ZXIsXG4gIHtcbiAgICBjb2xsZWN0aW9uLFxuICAgIGxpbWl0LFxuICAgIGxvY2FsZSxcbiAgICBwYWdlID0gMSxcbiAgICBwYWdpbmF0aW9uLFxuICAgIHJlcSA9IHt9IGFzIFBheWxvYWRSZXF1ZXN0LFxuICAgIHNvcnQ6IHNvcnRBcmcsXG4gICAgd2hlcmUsXG4gIH0sXG4pIHtcbiAgY29uc3QgY29sbGVjdGlvbkNvbmZpZzogU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZyA9IHRoaXMucGF5bG9hZC5jb2xsZ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JnZXQiLCJ0b1NuYWtlQ2FzZSIsInNsdWciLCJmaW5kTWFueSIsImFkYXB0ZXIiLCJmaWVsZHMiXSwibWFwcGluZ3MiOiI7Ozs7K0JBU2FBOzs7ZUFBQUE7OztvRUFOVzswQkFJQzs7Ozs7O0FBRWxCLE1BQU1BLE9BQWEsZUFBZUEsS0FFdkMsRUFDRUMsVUFBVSxFQUNWQyxLQUFLLEVBQ0xDLE1BQU0sRUFDTkMsT0FBTyxDQUFDLEVBQ1JDLFVBQVUsRUFDVkMsTUFBTSxDQUFDLENBQW1CLEVBQzFCQyxNQUFNQyxPQUFPLEVBQ2JDLEtBQUssRUFDTjtJQUVELE1BQU1DLG1CQUE4QyxJQUFJLENBQUNDLE9BQU8sQ0FBQ0MsV0FBVyxDQUFDWCxXQUFXLENBQUNZLE1BQU07SUFDL0YsTUFBTU4sT0FBTyxPQUFPQyxZQUFZLFdBQVdBLFVBQVVFLGlCQUFpQkksV0FBVztJQUVqRixNQUFNQyxZQUFZLElBQUksQ0FBQ0MsWUFBWSxDQUFDQyxHQUFHLENBQUNDLElBQUFBLG9CQUFXLEVBQUNSLGlCQUFpQlMsSUFBSTtJQUV6RSxPQUFPQyxJQUFBQSxrQkFBUSxFQUFDO1FBQ2RDLFNBQVMsSUFBSTtRQUNiQyxRQUFRWixpQkFBaUJZLE1BQU07UUFDL0JwQjtRQUNBQztRQUNBQztRQUNBQztRQUNBQztRQUNBQztRQUNBUTtRQUNBTjtJQUNGO0FBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"findGlobal.d.ts","sourceRoot":"","sources":["../src/findGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAOlD,eAAO,MAAM,UAAU,EAAE,UA6BxB,CAAA"}
1
+ {"version":3,"file":"findGlobal.d.ts","sourceRoot":"","sources":["../src/findGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAQlD,eAAO,MAAM,UAAU,EAAE,UA2BxB,CAAA"}
@@ -8,14 +8,16 @@ Object.defineProperty(exports, "findGlobal", {
8
8
  return findGlobal;
9
9
  }
10
10
  });
11
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
11
12
  const _findMany = require("./find/findMany");
12
- const _getTableName = require("./schema/getTableName");
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
13
18
  const findGlobal = async function findGlobal({ slug, locale, req, where }) {
14
19
  const globalConfig = this.payload.globals.config.find((config)=>config.slug === slug);
15
- const tableName = (0, _getTableName.getTableName)({
16
- adapter: this,
17
- config: globalConfig
18
- });
20
+ const tableName = this.tableNameMap.get((0, _tosnakecase.default)(globalConfig.slug));
19
21
  const { docs: [doc] } = await (0, _findMany.findMany)({
20
22
  adapter: this,
21
23
  fields: globalConfig.fields,
@@ -33,4 +35,4 @@ const findGlobal = async function findGlobal({ slug, locale, req, where }) {
33
35
  return {};
34
36
  };
35
37
 
36
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kR2xvYmFsLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZEdsb2JhbCB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi90eXBlcydcblxuaW1wb3J0IHsgZmluZE1hbnkgfSBmcm9tICcuL2ZpbmQvZmluZE1hbnknXG5pbXBvcnQgeyBnZXRUYWJsZU5hbWUgfSBmcm9tICcuL3NjaGVtYS9nZXRUYWJsZU5hbWUnXG5cbmV4cG9ydCBjb25zdCBmaW5kR2xvYmFsOiBGaW5kR2xvYmFsID0gYXN5bmMgZnVuY3Rpb24gZmluZEdsb2JhbChcbiAgdGhpczogUG9z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hbFR5cGUiXSwibWFwcGluZ3MiOiI7Ozs7K0JBUWFBOzs7ZUFBQUE7OztvRUFOVzswQkFJQzs7Ozs7O0FBRWxCLE1BQU1BLGFBQXlCLGVBQWVBLFdBRW5ELEVBQUVDLElBQUksRUFBRUMsTUFBTSxFQUFFQyxHQUFHLEVBQUVDLEtBQUssRUFBRTtJQUU1QixNQUFNQyxlQUFlLElBQUksQ0FBQ0MsT0FBTyxDQUFDQyxPQUFPLENBQUNDLE1BQU0sQ0FBQ0MsSUFBSSxDQUFDLENBQUNELFNBQVdBLE9BQU9QLElBQUksS0FBS0E7SUFFbEYsTUFBTVMsWUFBWSxJQUFJLENBQUNDLFlBQVksQ0FBQ0MsR0FBRyxDQUFDQyxJQUFBQSxvQkFBVyxFQUFDUixhQUFhSixJQUFJO0lBRXJFLE1BQU0sRUFDSmEsTUFBTSxDQUFDQyxJQUFJLEVBQ1osR0FBRyxNQUFNQyxJQUFBQSxrQkFBUSxFQUFDO1FBQ2pCQyxTQUFTLElBQUk7UUFDYkMsUUFBUWIsYUFBYWEsTUFBTTtRQUMzQkMsT0FBTztRQUNQakI7UUFDQWtCLFlBQVk7UUFDWmpCO1FBQ0FPO1FBQ0FOO0lBQ0Y7SUFFQSxJQUFJVyxLQUFLO1FBQ1BBLElBQUlNLFVBQVUsR0FBR3BCO1FBQ2pCLE9BQU9jO0lBQ1Q7SUFFQSxPQUFPLENBQUM7QUFDViJ9
@@ -1 +1 @@
1
- {"version":3,"file":"findGlobalVersions.d.ts","sourceRoot":"","sources":["../src/findGlobalVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAU1D,eAAO,MAAM,kBAAkB,EAAE,kBAuChC,CAAA"}
1
+ {"version":3,"file":"findGlobalVersions.d.ts","sourceRoot":"","sources":["../src/findGlobalVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAU1D,eAAO,MAAM,kBAAkB,EAAE,kBAsChC,CAAA"}
@@ -9,16 +9,17 @@ Object.defineProperty(exports, "findGlobalVersions", {
9
9
  }
10
10
  });
11
11
  const _versions = require("payload/versions");
12
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
12
13
  const _findMany = require("./find/findMany");
13
- const _getTableName = require("./schema/getTableName");
14
+ function _interop_require_default(obj) {
15
+ return obj && obj.__esModule ? obj : {
16
+ default: obj
17
+ };
18
+ }
14
19
  const findGlobalVersions = async function findGlobalVersions({ global, limit, locale, page, pagination, req = {}, skip, sort: sortArg, where }) {
15
20
  const globalConfig = this.payload.globals.config.find(({ slug })=>slug === global);
16
21
  const sort = typeof sortArg === 'string' ? sortArg : '-createdAt';
17
- const tableName = (0, _getTableName.getTableName)({
18
- adapter: this,
19
- config: globalConfig,
20
- versions: true
21
- });
22
+ const tableName = this.tableNameMap.get(`_${(0, _tosnakecase.default)(globalConfig.slug)}${this.versionsSuffix}`);
22
23
  const fields = (0, _versions.buildVersionGlobalFields)(globalConfig);
23
24
  return (0, _findMany.findMany)({
24
25
  adapter: this,
@@ -35,4 +36,4 @@ const findGlobalVersions = async function findGlobalVersions({ global, limit, lo
35
36
  });
36
37
  };
37
38
 
38
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kR2xvYmFsVmVyc2lvbnMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBGaW5kR2xvYmFsVmVyc2lvbnMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkR2xvYmFsQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgYnVpbGRWZXJzaW9uR2xvYmFsRmllbGRzIH0gZnJvbSAncGF5bG9hZC92ZXJzaW9uc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LElBQUk7UUFDYkg7UUFDQXBCO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FTO1FBQ0FQO0lBQ0Y7QUFDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../src/findOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,OAAO,CAAC,CAAC,SAAS,UAAU,EAChD,IAAI,EAAE,eAAe,EACrB,EAAE,UAAU,EAAE,MAAM,EAAE,GAA0B,EAAE,KAAK,EAAE,EAAE,WAAW,GACrE,OAAO,CAAC,CAAC,CAAC,CAqBZ"}
1
+ {"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../src/findOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,OAAO,CAAC,CAAC,SAAS,UAAU,EAChD,IAAI,EAAE,eAAe,EACrB,EAAE,UAAU,EAAE,MAAM,EAAE,GAA0B,EAAE,KAAK,EAAE,EAAE,WAAW,GACrE,OAAO,CAAC,CAAC,CAAC,CAmBZ"}
package/dist/findOne.js CHANGED
@@ -8,14 +8,16 @@ Object.defineProperty(exports, "findOne", {
8
8
  return findOne;
9
9
  }
10
10
  });
11
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
11
12
  const _findMany = require("./find/findMany");
12
- const _getTableName = require("./schema/getTableName");
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
13
18
  async function findOne({ collection, locale, req = {}, where }) {
14
19
  const collectionConfig = this.payload.collections[collection].config;
15
- const tableName = (0, _getTableName.getTableName)({
16
- adapter: this,
17
- config: collectionConfig
18
- });
20
+ const tableName = this.tableNameMap.get((0, _tosnakecase.default)(collectionConfig.slug));
19
21
  const { docs } = await (0, _findMany.findMany)({
20
22
  adapter: this,
21
23
  fields: collectionConfig.fields,
@@ -31,4 +33,4 @@ async function findOne({ collection, locale, req = {}, where }) {
31
33
  return docs?.[0] || null;
32
34
  }
33
35
 
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kT25lLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZE9uZUFyZ3MgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZywgVHlwZVdpdGhJRCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi90eXBlcydcblxuaW1wb3J0IHsgZmluZE1hbnkgfSBmcm9tICcuL2ZpbmQvZmluZE1hbnknXG5pbXBvcnQgeyBnZXRUYWJsZU5hbWUgfSBmcm9tICcuL3NjaGVtYS9nZXRUYWJsZU5hbWUnXG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBmaW5kT25lPFQgZXh0ZW5kcyBUeXBlV2l0aElEPihcbiAgdGhpczogUG9zdGdyZXNBZGFwdGVyLFxuICB7IGNvbGxlY3Rpb24sIGxvY2FsZSwgcmVxID0ge30gYXMgUGF5bG9hZFJlcXVlc3QsIHdoZXJlIH06IEZpbmRPbmVBcmdzLFxuKTogUHJvbWlzZTxUPiB7XG4gIGNvbnN0IGNvbGx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Iiwic29ydCIsInVuZGVmaW5lZCJdLCJtYXBwaW5ncyI6Ijs7OzsrQkFTc0JBOzs7ZUFBQUE7OztvRUFORTswQkFJQzs7Ozs7O0FBRWxCLGVBQWVBLFFBRXBCLEVBQUVDLFVBQVUsRUFBRUMsTUFBTSxFQUFFQyxNQUFNLENBQUMsQ0FBbUIsRUFBRUMsS0FBSyxFQUFlO0lBRXRFLE1BQU1DLG1CQUE4QyxJQUFJLENBQUNDLE9BQU8sQ0FBQ0MsV0FBVyxDQUFDTixXQUFXLENBQUNPLE1BQU07SUFFL0YsTUFBTUMsWUFBWSxJQUFJLENBQUNDLFlBQVksQ0FBQ0MsR0FBRyxDQUFDQyxJQUFBQSxvQkFBVyxFQUFDUCxpQkFBaUJRLElBQUk7SUFFekUsTUFBTSxFQUFFQyxJQUFJLEVBQUUsR0FBRyxNQUFNQyxJQUFBQSxrQkFBUSxFQUFDO1FBQzlCQyxTQUFTLElBQUk7UUFDYkMsUUFBUVosaUJBQWlCWSxNQUFNO1FBQy9CQyxPQUFPO1FBQ1BoQjtRQUNBaUIsTUFBTTtRQUNOQyxZQUFZO1FBQ1pqQjtRQUNBa0IsTUFBTUM7UUFDTmI7UUFDQUw7SUFDRjtJQUVBLE9BQU9VLE1BQU0sQ0FBQyxFQUFFLElBQUk7QUFDdEIifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../src/findVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAUpD,eAAO,MAAM,YAAY,EAAE,YAqC1B,CAAA"}
1
+ {"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../src/findVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAUpD,eAAO,MAAM,YAAY,EAAE,YAoC1B,CAAA"}
@@ -9,16 +9,17 @@ Object.defineProperty(exports, "findVersions", {
9
9
  }
10
10
  });
11
11
  const _versions = require("payload/versions");
12
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
12
13
  const _findMany = require("./find/findMany");
13
- const _getTableName = require("./schema/getTableName");
14
+ function _interop_require_default(obj) {
15
+ return obj && obj.__esModule ? obj : {
16
+ default: obj
17
+ };
18
+ }
14
19
  const findVersions = async function findVersions({ collection, limit, locale, page, pagination, req = {}, skip, sort: sortArg, where }) {
15
20
  const collectionConfig = this.payload.collections[collection].config;
16
21
  const sort = typeof sortArg === 'string' ? sortArg : collectionConfig.defaultSort;
17
- const tableName = (0, _getTableName.getTableName)({
18
- adapter: this,
19
- config: collectionConfig,
20
- versions: true
21
- });
22
+ const tableName = this.tableNameMap.get(`_${(0, _tosnakecase.default)(collectionConfig.slug)}${this.versionsSuffix}`);
22
23
  const fields = (0, _versions.buildVersionCollectionFields)(collectionConfig);
23
24
  return (0, _findMany.findMany)({
24
25
  adapter: this,
@@ -35,4 +36,4 @@ const findVersions = async function findVersions({ collection, limit, locale, pa
35
36
  });
36
37
  };
37
38
 
38
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maW5kVmVyc2lvbnMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBGaW5kVmVyc2lvbnMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCwgU2FuaXRpemVkQ29sbGVjdGlvbkNvbmZpZyB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGJ1aWxkVmVyc2lvbkNvbGxlY3Rpb25GaWVsZHMgfSBmcm9tICdwYXlsb2FkL3ZlcnNpb25zJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGZpbmRNYW55IH0gZ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1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAiC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CAoEjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAkC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CAmEjE"}
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
12
12
  const _path = /*#__PURE__*/ _interop_require_default(require("path"));
13
13
  const _database = require("payload/database");
14
14
  const _connect = require("./connect");
15
+ const _count = require("./count");
15
16
  const _create = require("./create");
16
17
  const _createGlobal = require("./createGlobal");
17
18
  const _createGlobalVersion = require("./createGlobalVersion");
@@ -47,17 +48,16 @@ function _interop_require_default(obj) {
47
48
  };
48
49
  }
49
50
  function postgresAdapter(args) {
51
+ const postgresIDType = args.idType || 'serial';
52
+ const payloadIDType = postgresIDType === 'serial' ? 'number' : 'text';
50
53
  function adapter({ payload }) {
51
54
  const migrationDir = findMigrationDir(args.migrationDir);
52
- const idType = args.idType || 'serial';
53
55
  return (0, _database.createDatabaseAdapter)({
54
56
  name: 'postgres',
55
- // Postgres-specific
56
- blockTableNames: {},
57
57
  drizzle: undefined,
58
58
  enums: {},
59
59
  fieldConstraints: {},
60
- idType,
60
+ idType: postgresIDType,
61
61
  localesSuffix: args.localesSuffix || '_locales',
62
62
  logger: args.logger,
63
63
  pgSchema: undefined,
@@ -69,20 +69,20 @@ function postgresAdapter(args) {
69
69
  schema: {},
70
70
  schemaName: args.schemaName,
71
71
  sessions: {},
72
+ tableNameMap: new Map(),
72
73
  tables: {},
73
74
  versionsSuffix: args.versionsSuffix || '_v',
74
75
  // DatabaseAdapter
75
76
  beginTransaction: _beginTransaction.beginTransaction,
76
77
  commitTransaction: _commitTransaction.commitTransaction,
77
78
  connect: _connect.connect,
79
+ count: _count.count,
78
80
  create: _create.create,
79
81
  createGlobal: _createGlobal.createGlobal,
80
82
  createGlobalVersion: _createGlobalVersion.createGlobalVersion,
81
83
  createMigration: _createMigration.createMigration,
82
84
  createVersion: _createVersion.createVersion,
83
- /**
84
- * This represents how a default ID is treated in Payload as were a field type
85
- */ defaultIDType: idType === 'serial' ? 'number' : 'text',
85
+ defaultIDType: payloadIDType,
86
86
  deleteMany: _deleteMany.deleteMany,
87
87
  deleteOne: _deleteOne.deleteOne,
88
88
  deleteVersions: _deleteVersions.deleteVersions,
@@ -144,4 +144,4 @@ function postgresAdapter(args) {
144
144
  return srcDir;
145
145
  }
146
146
 
147
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuXG5pbXBvcnQgZnMgZnJvbSAnZnMnXG5pbXBvcnQgcGF0aCBmcm9tICdwYXRoJ1xuaW1wb3J0IHsgY3JlYXRlRGF0YWJhc2VBZGFwdGVyIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcblxuaW1wb3J0IHR5cGUgeyBBcmdzLCBQb3N0Z3Jlc0FkYXB0ZXIsIFBvc3RncmVzQWRhcHRlclJlc3VsdCB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGNvbm5lY3QgfSBmcm9tICcuL2Nvbm5lY3QnXG5pbXBvcnQgeyBjcmV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O0lBRUEsSUFBSUssV0FBRSxDQUFDQyxVQUFVLENBQUNILFVBQVU7UUFDMUIsT0FBT0E7SUFDVDtJQUVBLElBQUlFLFdBQUUsQ0FBQ0MsVUFBVSxDQUFDRixxQkFBcUI7UUFDckMsT0FBT0E7SUFDVDtJQUVBLE9BQU9KO0FBQ1QifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAW5C,eAAO,MAAM,IAAI,EAAE,IA0FlB,CAAA"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAW5C,eAAO,MAAM,IAAI,EAAE,IAgGlB,CAAA"}