quiverdb 0.9.10 → 0.9.11

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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quiverdb",
3
- "version": "0.9.10",
3
+ "version": "0.9.11",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
package/src/database.ts CHANGED
@@ -151,7 +151,7 @@ export class Database {
151
151
  id: number,
152
152
  data: TimeSeriesData,
153
153
  ) => void;
154
- declare addTimeSeriesRow: (
154
+ declare upsertTimeSeriesRow: (
155
155
  collection: string,
156
156
  group: string,
157
157
  id: number,
package/src/loader.ts CHANGED
@@ -123,7 +123,7 @@ const timeSeriesSymbols = {
123
123
  returns: I32,
124
124
  },
125
125
  quiver_database_read_time_series_row: { args: [P, BUF, BUF, BUF, BUF, P, P, P], returns: I32 },
126
- quiver_database_add_time_series_row: { args: [P, BUF, BUF, I64, P, P, P, USIZE], returns: I32 },
126
+ quiver_database_upsert_time_series_row: { args: [P, BUF, BUF, I64, P, P, P, USIZE], returns: I32 },
127
127
  quiver_database_update_time_series_group: {
128
128
  args: [P, BUF, BUF, I64, P, P, P, P, USIZE, USIZE],
129
129
  returns: I32,
package/src/lua-api.ts CHANGED
@@ -166,7 +166,7 @@ Notes:
166
166
  \`{ x = nil }\` is identical to \`{}\`; an update/create table that ends up with no attributes
167
167
  **throws** (\`element must have at least one attribute\`). To leave a column unchanged, omit the
168
168
  key — you cannot set a scalar to NULL via the element table. (\`nil\` → NULL is only accepted by
169
- \`add_time_series_row\` and \`update_time_series_files\`.)
169
+ \`upsert_time_series_row\` and \`update_time_series_files\`.)
170
170
 
171
171
  ---
172
172
 
@@ -274,7 +274,7 @@ db:update_time_series_group("Items", "data", id, ts) -- write the whole group
274
274
  \`\`\`
275
275
 
276
276
  **DO NOT pass an array of row tables** (\`{ { date_time = ..., value = ... }, ... }\`) — that is the
277
- \`add_time_series_row\` shape, not this one. Doing so raises
277
+ \`upsert_time_series_row\` shape, not this one. Doing so raises
278
278
  \`stack index -1, expected string, received number\` (the integer array indices 1, 2, 3 are not
279
279
  column names). Each value of the top-level table must be an **array**, not a scalar.
280
280
 
@@ -293,13 +293,13 @@ column names). Each value of the top-level table must be an **array**, not a sca
293
293
  - Integer values are accepted for REAL columns (converted on insert). Booleans, functions, and
294
294
  other unsupported Lua types throw \`column '...' has unsupported Lua type\`.
295
295
 
296
- ### Append/upsert a single row (\`add_time_series_row\` — ROW-oriented, the one exception)
296
+ ### Append/upsert a single row (\`upsert_time_series_row\` — ROW-oriented, the one exception)
297
297
 
298
298
  Unlike the column-oriented group update above, this takes **one row table of scalars** (dimension
299
299
  column + value column(s)), and upserts that single row:
300
300
 
301
301
  \`\`\`lua
302
- db:add_time_series_row("Items", "data", id, {
302
+ db:upsert_time_series_row("Items", "data", id, {
303
303
  date_time = "2024-01-04T00:00:00",
304
304
  value = 40.0,
305
305
  })
@@ -318,7 +318,7 @@ Database.prototype.updateTimeSeriesGroup = function (
318
318
  );
319
319
  };
320
320
 
321
- Database.prototype.addTimeSeriesRow = function (
321
+ Database.prototype.upsertTimeSeriesRow = function (
322
322
  this: Database,
323
323
  collection: string,
324
324
  group: string,
@@ -366,7 +366,7 @@ Database.prototype.addTimeSeriesRow = function (
366
366
  keepalive.push(dataTable);
367
367
 
368
368
  check(
369
- lib.quiver_database_add_time_series_row(
369
+ lib.quiver_database_upsert_time_series_row(
370
370
  this._handle,
371
371
  collBuf.buf,
372
372
  grpBuf.buf,