@onyx.dev/onyx-database 1.0.3 → 1.1.0
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/README.md +33 -1
- package/dist/{aggregates-BGXzij4U.d.cts → aggregates-DodZNu9-.d.cts} +30 -1
- package/dist/{aggregates-BGXzij4U.d.ts → aggregates-DodZNu9-.d.ts} +30 -1
- package/dist/edge.cjs +22 -0
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.d.cts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +22 -1
- package/dist/edge.js.map +1 -1
- package/dist/gen/cli/generate.cjs +16 -0
- package/dist/gen/cli/generate.cjs.map +1 -1
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/schema/cli/schema.cjs +16 -0
- package/dist/schema/cli/schema.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -1422,6 +1422,14 @@ var OnyxDatabaseImpl = class {
|
|
|
1422
1422
|
qb.select(...fields);
|
|
1423
1423
|
return qb;
|
|
1424
1424
|
}
|
|
1425
|
+
search(queryText, minScore) {
|
|
1426
|
+
const qb = new QueryBuilderImpl(
|
|
1427
|
+
this,
|
|
1428
|
+
"ALL",
|
|
1429
|
+
this.defaultPartition
|
|
1430
|
+
);
|
|
1431
|
+
return qb.search(queryText, minScore);
|
|
1432
|
+
}
|
|
1425
1433
|
cascade(...relationships) {
|
|
1426
1434
|
const cb = new CascadeBuilderImpl(this);
|
|
1427
1435
|
return cb.cascade(...relationships);
|
|
@@ -1708,6 +1716,7 @@ var QueryBuilderImpl = class {
|
|
|
1708
1716
|
toSelectQuery() {
|
|
1709
1717
|
return {
|
|
1710
1718
|
type: "SelectQuery",
|
|
1719
|
+
table: this.table,
|
|
1711
1720
|
fields: this.fields,
|
|
1712
1721
|
conditions: this.serializableConditions(),
|
|
1713
1722
|
sort: this.sort,
|
|
@@ -1747,6 +1756,13 @@ var QueryBuilderImpl = class {
|
|
|
1747
1756
|
this.resolvers = flat.length > 0 ? flat : null;
|
|
1748
1757
|
return this;
|
|
1749
1758
|
}
|
|
1759
|
+
search(queryText, minScore) {
|
|
1760
|
+
return this.and({
|
|
1761
|
+
field: "__full_text__",
|
|
1762
|
+
operator: "MATCHES",
|
|
1763
|
+
value: { queryText, minScore: minScore ?? null }
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1750
1766
|
where(condition) {
|
|
1751
1767
|
const c = toCondition(condition);
|
|
1752
1768
|
if (!this.conditions) {
|