@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.
@@ -1458,6 +1458,14 @@ var OnyxDatabaseImpl = class {
1458
1458
  qb.select(...fields);
1459
1459
  return qb;
1460
1460
  }
1461
+ search(queryText, minScore) {
1462
+ const qb = new QueryBuilderImpl(
1463
+ this,
1464
+ "ALL",
1465
+ this.defaultPartition
1466
+ );
1467
+ return qb.search(queryText, minScore);
1468
+ }
1461
1469
  cascade(...relationships) {
1462
1470
  const cb = new CascadeBuilderImpl(this);
1463
1471
  return cb.cascade(...relationships);
@@ -1744,6 +1752,7 @@ var QueryBuilderImpl = class {
1744
1752
  toSelectQuery() {
1745
1753
  return {
1746
1754
  type: "SelectQuery",
1755
+ table: this.table,
1747
1756
  fields: this.fields,
1748
1757
  conditions: this.serializableConditions(),
1749
1758
  sort: this.sort,
@@ -1783,6 +1792,13 @@ var QueryBuilderImpl = class {
1783
1792
  this.resolvers = flat.length > 0 ? flat : null;
1784
1793
  return this;
1785
1794
  }
1795
+ search(queryText, minScore) {
1796
+ return this.and({
1797
+ field: "__full_text__",
1798
+ operator: "MATCHES",
1799
+ value: { queryText, minScore: minScore ?? null }
1800
+ });
1801
+ }
1786
1802
  where(condition) {
1787
1803
  const c = toCondition(condition);
1788
1804
  if (!this.conditions) {