convex-ents 0.5.0 → 0.5.1
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/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/schema.cjs +9 -0
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var src_exports = {};
|
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
addEntRules: () => addEntRules,
|
|
24
24
|
defineEnt: () => defineEnt,
|
|
25
|
+
defineEntFromTable: () => defineEntFromTable,
|
|
25
26
|
defineEntSchema: () => defineEntSchema,
|
|
26
27
|
entsTableFactory: () => entsTableFactory,
|
|
27
28
|
getEntDefinitions: () => getEntDefinitions,
|
|
@@ -189,6 +190,13 @@ function deletionConfigFromEntDefinition(table) {
|
|
|
189
190
|
function defineEnt(documentSchema) {
|
|
190
191
|
return new EntDefinitionImpl(documentSchema);
|
|
191
192
|
}
|
|
193
|
+
function defineEntFromTable(definition) {
|
|
194
|
+
const entDefinition = defineEnt(definition.documentType);
|
|
195
|
+
entDefinition.indexes = definition.indexes;
|
|
196
|
+
entDefinition.searchIndexes = definition.searchIndexes;
|
|
197
|
+
entDefinition.vectorIndexes = definition.vectorIndexes;
|
|
198
|
+
return entDefinition;
|
|
199
|
+
}
|
|
192
200
|
var EntDefinitionImpl = class {
|
|
193
201
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
194
202
|
// @ts-ignore
|
|
@@ -1866,6 +1874,7 @@ async function paginate(ctx, {
|
|
|
1866
1874
|
0 && (module.exports = {
|
|
1867
1875
|
addEntRules,
|
|
1868
1876
|
defineEnt,
|
|
1877
|
+
defineEntFromTable,
|
|
1869
1878
|
defineEntSchema,
|
|
1870
1879
|
entsTableFactory,
|
|
1871
1880
|
getEntDefinitions,
|