@exulu/backend 1.36.0 → 1.36.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/CHANGELOG.md +3 -3
- package/dist/index.cjs +8 -3
- package/dist/index.js +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## [1.36.1](https://github.com/Qventu/exulu-backend/compare/v1.36.0...v1.36.1) (2025-11-19)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* issue with upsert ([37c1805](https://github.com/Qventu/exulu-backend/commit/37c1805ff14d3c1aacc116760d8b905db8a2ce6c))
|
package/dist/index.cjs
CHANGED
|
@@ -5907,7 +5907,13 @@ var ExuluContext = class {
|
|
|
5907
5907
|
}
|
|
5908
5908
|
).returning("id");
|
|
5909
5909
|
if (upsert) {
|
|
5910
|
-
|
|
5910
|
+
if (item.external_id) {
|
|
5911
|
+
mutation.onConflict("external_id").merge();
|
|
5912
|
+
} else if (item.id) {
|
|
5913
|
+
mutation.onConflict("id").merge();
|
|
5914
|
+
} else {
|
|
5915
|
+
throw new Error("Either id or external_id must be provided for upsert");
|
|
5916
|
+
}
|
|
5911
5917
|
}
|
|
5912
5918
|
const results = await mutation;
|
|
5913
5919
|
if (!results[0]) {
|
|
@@ -6083,14 +6089,13 @@ var ExuluContext = class {
|
|
|
6083
6089
|
table.text("description");
|
|
6084
6090
|
table.text("tags");
|
|
6085
6091
|
table.boolean("archived").defaultTo(false);
|
|
6086
|
-
table.text("external_id");
|
|
6092
|
+
table.text("external_id").unique();
|
|
6087
6093
|
table.text("created_by");
|
|
6088
6094
|
table.text("ttl");
|
|
6089
6095
|
table.text("rights_mode").defaultTo(this.configuration?.defaultRightsMode ?? "private");
|
|
6090
6096
|
table.integer("textlength");
|
|
6091
6097
|
table.text("source");
|
|
6092
6098
|
table.timestamp("embeddings_updated_at");
|
|
6093
|
-
table.unique(["id", "external_id"]);
|
|
6094
6099
|
for (const field of this.fields) {
|
|
6095
6100
|
let { type, name, unique } = field;
|
|
6096
6101
|
if (!type || !name) {
|
package/dist/index.js
CHANGED
|
@@ -5874,7 +5874,13 @@ var ExuluContext = class {
|
|
|
5874
5874
|
}
|
|
5875
5875
|
).returning("id");
|
|
5876
5876
|
if (upsert) {
|
|
5877
|
-
|
|
5877
|
+
if (item.external_id) {
|
|
5878
|
+
mutation.onConflict("external_id").merge();
|
|
5879
|
+
} else if (item.id) {
|
|
5880
|
+
mutation.onConflict("id").merge();
|
|
5881
|
+
} else {
|
|
5882
|
+
throw new Error("Either id or external_id must be provided for upsert");
|
|
5883
|
+
}
|
|
5878
5884
|
}
|
|
5879
5885
|
const results = await mutation;
|
|
5880
5886
|
if (!results[0]) {
|
|
@@ -6050,14 +6056,13 @@ var ExuluContext = class {
|
|
|
6050
6056
|
table.text("description");
|
|
6051
6057
|
table.text("tags");
|
|
6052
6058
|
table.boolean("archived").defaultTo(false);
|
|
6053
|
-
table.text("external_id");
|
|
6059
|
+
table.text("external_id").unique();
|
|
6054
6060
|
table.text("created_by");
|
|
6055
6061
|
table.text("ttl");
|
|
6056
6062
|
table.text("rights_mode").defaultTo(this.configuration?.defaultRightsMode ?? "private");
|
|
6057
6063
|
table.integer("textlength");
|
|
6058
6064
|
table.text("source");
|
|
6059
6065
|
table.timestamp("embeddings_updated_at");
|
|
6060
|
-
table.unique(["id", "external_id"]);
|
|
6061
6066
|
for (const field of this.fields) {
|
|
6062
6067
|
let { type, name, unique } = field;
|
|
6063
6068
|
if (!type || !name) {
|