@xata.io/client 0.23.2 → 0.23.4

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @xata.io/client@0.23.2 add-version /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.23.4 add-version /home/runner/work/client-ts/client-ts/packages/client
3
3
  > node ../../scripts/add-version-file.mjs
4
4
 
@@ -1,13 +1,13 @@
1
1
 
2
- > @xata.io/client@0.23.2 build /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.23.4 build /home/runner/work/client-ts/client-ts/packages/client
3
3
  > rimraf dist && rollup -c
4
4
 
5
5
  
6
6
  src/index.ts → dist/index.cjs...
7
- created dist/index.cjs in 1s
7
+ created dist/index.cjs in 1.1s
8
8
  
9
9
  src/index.ts → dist/index.mjs...
10
- created dist/index.mjs in 851ms
10
+ created dist/index.mjs in 829ms
11
11
  
12
12
  src/index.ts → dist/index.d.ts...
13
- created dist/index.d.ts in 5.7s
13
+ created dist/index.d.ts in 5.4s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @xata.io/client
2
2
 
3
+ ## 0.23.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#951](https://github.com/xataio/client-ts/pull/951) [`470cc71f`](https://github.com/xataio/client-ts/commit/470cc71f7c5c8b9fd50f789e157d2b2eecd0b3e8) Thanks [@SferaDev](https://github.com/SferaDev)! - Add random sorting
8
+
9
+ ## 0.23.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#947](https://github.com/xataio/client-ts/pull/947) [`344b0d68`](https://github.com/xataio/client-ts/commit/344b0d687962d569872d1e90d59818d28df7579c) Thanks [@SferaDev](https://github.com/SferaDev)! - Add numeric operators
14
+
3
15
  ## 0.23.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -492,7 +492,7 @@ function defaultOnOpen(response) {
492
492
  }
493
493
  }
494
494
 
495
- const VERSION = "0.23.2";
495
+ const VERSION = "0.23.4";
496
496
 
497
497
  class ErrorWithCause extends Error {
498
498
  constructor(message, options) {
@@ -863,6 +863,12 @@ const searchTable = (variables, signal) => dataPlaneFetch({
863
863
  ...variables,
864
864
  signal
865
865
  });
866
+ const sqlQuery = (variables, signal) => dataPlaneFetch({
867
+ url: "/db/{dbBranchName}/sql",
868
+ method: "post",
869
+ ...variables,
870
+ signal
871
+ });
866
872
  const vectorSearchTable = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/tables/{tableName}/vectorSearch", method: "post", ...variables, signal });
867
873
  const askTable = (variables, signal) => dataPlaneFetch({
868
874
  url: "/db/{dbBranchName}/tables/{tableName}/ask",
@@ -935,6 +941,7 @@ const operationsByTag$2 = {
935
941
  queryTable,
936
942
  searchBranch,
937
943
  searchTable,
944
+ sqlQuery,
938
945
  vectorSearchTable,
939
946
  askTable,
940
947
  summarizeTable,
@@ -2604,7 +2611,11 @@ function isSortFilterString(value) {
2604
2611
  return isString(value);
2605
2612
  }
2606
2613
  function isSortFilterBase(filter) {
2607
- return isObject(filter) && Object.values(filter).every((value) => value === "asc" || value === "desc");
2614
+ return isObject(filter) && Object.entries(filter).every(([key, value]) => {
2615
+ if (key === "*")
2616
+ return value === "random";
2617
+ return value === "asc" || value === "desc";
2618
+ });
2608
2619
  }
2609
2620
  function isSortFilterObject(filter) {
2610
2621
  return isObject(filter) && !isSortFilterBase(filter) && filter.column !== void 0;
@@ -3702,8 +3713,6 @@ const buildClient = (plugins) => {
3702
3713
  console.warn(
3703
3714
  `No branch was passed to the client constructor. Using default branch ${branch}. You can set the branch with the environment variable XATA_BRANCH or by passing the branch option to the client constructor.`
3704
3715
  );
3705
- } else {
3706
- console.log(`Using branch ${branch}`);
3707
3716
  }
3708
3717
  return {
3709
3718
  fetch,
@@ -3967,6 +3976,7 @@ exports.searchBranch = searchBranch;
3967
3976
  exports.searchTable = searchTable;
3968
3977
  exports.serialize = serialize;
3969
3978
  exports.setTableSchema = setTableSchema;
3979
+ exports.sqlQuery = sqlQuery;
3970
3980
  exports.startsWith = startsWith;
3971
3981
  exports.summarizeTable = summarizeTable;
3972
3982
  exports.updateBranchMetadata = updateBranchMetadata;