@zenstackhq/orm 3.0.0-beta.28 → 3.0.0-beta.29
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -27
- package/dist/index.d.ts +36 -27
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -2008,7 +2008,7 @@ var SqliteCrudDialect = class extends BaseCrudDialect {
|
|
|
2008
2008
|
if (Array.isArray(value)) {
|
|
2009
2009
|
throw createNotSupportedError('SQLite "array_contains" only supports checking for a single value, not an array of values');
|
|
2010
2010
|
} else {
|
|
2011
|
-
return import_kysely4.sql`EXISTS (SELECT 1 FROM
|
|
2011
|
+
return import_kysely4.sql`EXISTS (SELECT 1 FROM json_each(${lhs}) WHERE value = ${value})`;
|
|
2012
2012
|
}
|
|
2013
2013
|
}).with("array_starts_with", () => this.eb(this.eb.fn("json_extract", [
|
|
2014
2014
|
lhs,
|
|
@@ -2016,7 +2016,7 @@ var SqliteCrudDialect = class extends BaseCrudDialect {
|
|
|
2016
2016
|
]), "=", value)).with("array_ends_with", () => this.eb(import_kysely4.sql`json_extract(${lhs}, '$[' || (json_array_length(${lhs}) - 1) || ']')`, "=", value)).exhaustive();
|
|
2017
2017
|
}
|
|
2018
2018
|
buildJsonArrayExistsPredicate(receiver, buildFilter) {
|
|
2019
|
-
return this.eb.exists(this.eb.selectFrom(this.eb.fn("
|
|
2019
|
+
return this.eb.exists(this.eb.selectFrom(this.eb.fn("json_each", [
|
|
2020
2020
|
receiver
|
|
2021
2021
|
]).as("$items")).select(this.eb.lit(1).as("$t")).where(buildFilter(this.eb.ref("$items.value"))));
|
|
2022
2022
|
}
|