@housekit/orm 0.1.2 → 0.1.3
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/README.md +4 -3
- package/dist/builders/insert.d.ts +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -152,9 +152,10 @@ const builder = db.insert(webEvents)
|
|
|
152
152
|
flushIntervalMs: 5000
|
|
153
153
|
});
|
|
154
154
|
|
|
155
|
-
//
|
|
156
|
-
|
|
157
|
-
builder.
|
|
155
|
+
// Add rows to the background queue.
|
|
156
|
+
// Proccessing and flushing happen automatically.
|
|
157
|
+
await builder.append(row1);
|
|
158
|
+
await builder.append(row2);
|
|
158
159
|
```
|
|
159
160
|
|
|
160
161
|
---
|
|
@@ -64,6 +64,16 @@ export declare class ClickHouseInsertBuilder<TTable extends TableDefinition<Tabl
|
|
|
64
64
|
* Default: 1000
|
|
65
65
|
*/
|
|
66
66
|
batchSize(size: number): this;
|
|
67
|
+
/**
|
|
68
|
+
* Add a row to the background batcher.
|
|
69
|
+
*
|
|
70
|
+
* If batching is not yet configured, it will use default settings
|
|
71
|
+
* (10,000 rows or 5 seconds).
|
|
72
|
+
*
|
|
73
|
+
* Note: This method is "fire-and-forget" and does not wait for
|
|
74
|
+
* the database to acknowledge the insert.
|
|
75
|
+
*/
|
|
76
|
+
append(row: TableInsert<TTable['$columns']>): Promise<void>;
|
|
67
77
|
/**
|
|
68
78
|
* Force JSON format (useful for debugging or compatibility).
|
|
69
79
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@housekit/orm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Type-safe ClickHouse ORM with modern DX and ClickHouse-specific optimizations. Features Turbo Mode (RowBinary), full engine support, and advanced query capabilities.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|