@infino-ai/infino 0.11.14 → 0.11.16

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/infino/index.d.ts CHANGED
@@ -217,7 +217,7 @@ export interface PlannedRepair {
217
217
  }
218
218
  export interface Bm25SearchOptions {
219
219
  mode?: BoolMode;
220
- /** Columns to return, e.g. `["_id", "score"]`; omit for full rows. */
220
+ /** Columns to return, e.g. `["_id", "body"]`; omit for `_id` + `score` only. */
221
221
  projection?: string[];
222
222
  /** BM25 `k1` for this search only, overriding the column's declared value.
223
223
  * Pass `k1` and `b` together or neither. Results stay exact; only pruning
@@ -325,6 +325,17 @@ export declare class Table {
325
325
  /** Count rows matching a BM25 keyword `query` over `column`, without
326
326
  * fetching them. `mode` is `"or"` (default) or `"and"`. */
327
327
  count(column: string, query: string, opts?: CountOptions): number;
328
+ /** `column`'s rows counted per value, as `SELECT column, COUNT(*) ...
329
+ * GROUP BY column` gives them: one record per value with its `count(*)`, a
330
+ * null value for the rows that hold none (or an Arrow `Table`). Read from
331
+ * the table's statistics when they count every row exactly, without
332
+ * running a query; the grouped count runs otherwise. */
333
+ valueCounts(column: string, opts: {
334
+ arrow: true;
335
+ }): arrow.Table;
336
+ valueCounts(column: string, opts?: {
337
+ arrow?: boolean;
338
+ }): RowRecord[];
328
339
  /** Replace rows matching a SQL predicate (e.g. `"status = 'spam'"`) with
329
340
  * `data` (same shapes as `append`), 1:1 — the matched count must equal the
330
341
  * replacement-row count. Requires durable storage (not `memory://`). */
@@ -391,7 +402,8 @@ export declare class Connection {
391
402
  * by `id` when it carries one and by `name` otherwise; an unmatched field
392
403
  * is added, a different type changes the column, `dropped: true` retires
393
404
  * it, and a field not mentioned is untouched. `expectedSchemaId` is a
394
- * compare-and-set against the current `schema_id`.
405
+ * compare-and-set against the current `schema_id`. Not yet available on a
406
+ * hosted (`https://`) connection; it raises an error there.
395
407
  */
396
408
  schema(name: string, patch?: SchemaPatch, expectedSchemaId?: number): TableSchema;
397
409
  /** Drop a table. `purge` defaults to `true`, which also deletes the table's storage; pass `false` to only unregister it and keep the bytes. */
package/infino/index.js CHANGED
@@ -333,6 +333,9 @@ class Table {
333
333
  count(column, query, opts = {}) {
334
334
  return guard(this.remote, () => this.inner.count(column, query, opts.mode));
335
335
  }
336
+ valueCounts(column, opts = {}) {
337
+ return decode(guard(this.remote, () => this.inner.valueCounts(column)), opts.arrow);
338
+ }
336
339
  /** Replace rows matching a SQL predicate (e.g. `"status = 'spam'"`) with
337
340
  * `data` (same shapes as `append`), 1:1 — the matched count must equal the
338
341
  * replacement-row count. Requires durable storage (not `memory://`). */
@@ -428,7 +431,8 @@ class Connection {
428
431
  * by `id` when it carries one and by `name` otherwise; an unmatched field
429
432
  * is added, a different type changes the column, `dropped: true` retires
430
433
  * it, and a field not mentioned is untouched. `expectedSchemaId` is a
431
- * compare-and-set against the current `schema_id`.
434
+ * compare-and-set against the current `schema_id`. Not yet available on a
435
+ * hosted (`https://`) connection; it raises an error there.
432
436
  */
433
437
  schema(name, patch, expectedSchemaId) {
434
438
  const text = guard(this.remote, () => this.inner.schema(name, patch === undefined ? undefined : JSON.stringify(patch), expectedSchemaId));
@@ -396,6 +396,14 @@ export declare class Table {
396
396
  * fetching them. `mode` is `"or"` (default) or `"and"`.
397
397
  */
398
398
  count(column: string, query: string, mode?: string | undefined | null): number
399
+ /**
400
+ * `column`'s rows counted per value, as `SELECT column, COUNT(*) ...
401
+ * GROUP BY column` gives them: Arrow rows of each value and its
402
+ * `count(*)`, with a null value for the rows that hold none. Read from
403
+ * the table's statistics when they count every row exactly, without
404
+ * running a query; the grouped count runs otherwise.
405
+ */
406
+ valueCounts(column: string): Buffer
399
407
  /**
400
408
  * Hybrid BM25 + vector search fused with reciprocal-rank fusion.
401
409
  * `text_column`/`text_query` (under `mode`) drive BM25; `vector_column`/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infino-ai/infino",
3
- "version": "0.11.14",
3
+ "version": "0.11.16",
4
4
  "description": "Fast search on object storage — SQL, full-text, and vector search.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -82,12 +82,12 @@
82
82
  "apache-arrow": "^17"
83
83
  },
84
84
  "optionalDependencies": {
85
- "infx-darwin-x64": "0.11.14",
86
- "infx-darwin-arm64": "0.11.14",
87
- "infx-linux-x64-gnu": "0.11.14",
88
- "infx-linux-arm64-gnu": "0.11.14",
89
- "infx-linux-x64-musl": "0.11.14",
90
- "infx-linux-arm64-musl": "0.11.14"
85
+ "infx-darwin-x64": "0.11.16",
86
+ "infx-darwin-arm64": "0.11.16",
87
+ "infx-linux-x64-gnu": "0.11.16",
88
+ "infx-linux-arm64-gnu": "0.11.16",
89
+ "infx-linux-x64-musl": "0.11.16",
90
+ "infx-linux-arm64-musl": "0.11.16"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@napi-rs/cli": "^2.18.0",