@aouda/client 0.1.13 → 0.1.14

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
- import { A as AoudaClient } from '../client-DFujaTFB.cjs';
1
+ import { A as AoudaClient } from '../client-BCMP-Fge.cjs';
2
2
 
3
3
  /**
4
4
  * CLI for @aouda/client.
@@ -1,4 +1,4 @@
1
- import { A as AoudaClient } from '../client-DFujaTFB.js';
1
+ import { A as AoudaClient } from '../client-BCMP-Fge.js';
2
2
 
3
3
  /**
4
4
  * CLI for @aouda/client.
package/dist/cli/index.js CHANGED
@@ -392,7 +392,7 @@ import { fileURLToPath } from "url";
392
392
  // package.json
393
393
  var package_default = {
394
394
  name: "@aouda/client",
395
- version: "0.1.13",
395
+ version: "0.1.14",
396
396
  description: "Official TypeScript/JavaScript client library for Aouda",
397
397
  type: "module",
398
398
  main: "./dist/index.cjs",
@@ -2475,6 +2475,9 @@ var TableSubscription = class {
2475
2475
  if (this._identity.args !== void 0) {
2476
2476
  message.args = this._identity.args;
2477
2477
  }
2478
+ if (this._identity.orderByIndex !== void 0) {
2479
+ message.orderByIndex = this._identity.orderByIndex;
2480
+ }
2478
2481
  } else {
2479
2482
  message.target = this._identity.target;
2480
2483
  if (this._identity.filter !== void 0) {
@@ -2523,12 +2526,16 @@ var TableSubscription = class {
2523
2526
  }
2524
2527
  const rows = this._pendingSnapshotRows;
2525
2528
  this._pendingSnapshotRows = [];
2526
- this._onSnapshot?.(rows, message.version);
2527
- this._queue.push({
2529
+ this._onSnapshot?.(rows, message.version, message.total_matches);
2530
+ const snapshot = {
2528
2531
  type: "snapshot",
2529
2532
  rows,
2530
2533
  version: message.version
2531
- });
2534
+ };
2535
+ if (message.total_matches !== void 0) {
2536
+ snapshot.totalMatches = message.total_matches;
2537
+ }
2538
+ this._queue.push(snapshot);
2532
2539
  }
2533
2540
  async _handleGap(message) {
2534
2541
  this._pendingSnapshotRows = [];
@@ -5084,9 +5091,15 @@ var NamedQueriesApi = class {
5084
5091
  }
5085
5092
  const prefix = databasePath2(this.database);
5086
5093
  const path4 = `${prefix}/named-queries/${encodeURIComponent(hash)}/query?format=columnar`;
5094
+ const body = {
5095
+ args: args ?? {}
5096
+ };
5097
+ if (options?.orderByIndex !== void 0) {
5098
+ body.orderByIndex = options.orderByIndex;
5099
+ }
5087
5100
  const response = await this.transport.post(
5088
5101
  path4,
5089
- { args: args ?? {} },
5102
+ body,
5090
5103
  { signal: options?.signal }
5091
5104
  );
5092
5105
  const rows = columnarToRows(response);
@@ -5094,7 +5107,8 @@ var NamedQueriesApi = class {
5094
5107
  return {
5095
5108
  rows,
5096
5109
  stats: response.stats,
5097
- warnings: response.warnings
5110
+ warnings: response.warnings,
5111
+ totalMatches: response.totalMatches
5098
5112
  };
5099
5113
  }
5100
5114
  async batch(items, options) {
@@ -5133,12 +5147,14 @@ var NamedQueriesApi = class {
5133
5147
  data: slot.data ?? [],
5134
5148
  rowCount: slot.rowCount ?? 0,
5135
5149
  stats: slot.stats ?? emptyStats(),
5136
- warnings: slot.warnings
5150
+ warnings: slot.warnings,
5151
+ totalMatches: slot.totalMatches
5137
5152
  };
5138
5153
  const result = {
5139
5154
  rows: columnarToRows(columnar),
5140
5155
  stats: columnar.stats,
5141
- warnings: slot.warnings
5156
+ warnings: slot.warnings,
5157
+ totalMatches: slot.totalMatches
5142
5158
  };
5143
5159
  raiseDeprecationWarnings(this.onWarning, slot.warnings);
5144
5160
  return { isError: false, result };
@@ -5150,7 +5166,7 @@ var NamedQueriesApi = class {
5150
5166
  }
5151
5167
  const subscription = new TableSubscription(
5152
5168
  this.getStreamingTransport(),
5153
- { kind: "named", hash, args },
5169
+ { kind: "named", hash, args, orderByIndex: options.orderByIndex },
5154
5170
  {
5155
5171
  onSnapshot: options.onSnapshot,
5156
5172
  onChange: options.onChange,