@visorcraft/mongreldb 0.19.5 → 0.20.1
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/mongreldb.linux-x64-gnu.node +0 -0
- package/native.d.ts +17 -0
- package/package.json +1 -1
|
Binary file
|
package/native.d.ts
CHANGED
|
@@ -53,6 +53,13 @@ export interface IndexSpec {
|
|
|
53
53
|
columnId: number
|
|
54
54
|
kind: IndexKindSpec
|
|
55
55
|
}
|
|
56
|
+
/** Result of a `compactAll` operation. */
|
|
57
|
+
export interface CompactStats {
|
|
58
|
+
/** Number of tables that were merged into a single run. */
|
|
59
|
+
compacted: number
|
|
60
|
+
/** Number of tables skipped (fewer than 2 runs, or compaction failed). */
|
|
61
|
+
skipped: number
|
|
62
|
+
}
|
|
56
63
|
export interface SchemaSpec {
|
|
57
64
|
columns: Array<ColumnSpec>
|
|
58
65
|
indexes: Array<IndexSpec>
|
|
@@ -212,6 +219,16 @@ export declare class Database {
|
|
|
212
219
|
check(): string
|
|
213
220
|
/** Repair/quarantine corrupt tables. Returns a JSON-string summary. */
|
|
214
221
|
doctor(): string
|
|
222
|
+
/**
|
|
223
|
+
* Compact every table: merge sorted runs into one clean run each so
|
|
224
|
+
* query latency stays flat. Tables with fewer than two runs are skipped.
|
|
225
|
+
*/
|
|
226
|
+
compactAll(): CompactStats
|
|
227
|
+
/**
|
|
228
|
+
* Compact a single table by name. Returns `true` if compacted, `false`
|
|
229
|
+
* if skipped (fewer than two runs).
|
|
230
|
+
*/
|
|
231
|
+
compactTable(name: string): boolean
|
|
215
232
|
/** Return the path passed to `withPath` / `open`. */
|
|
216
233
|
directory(): string
|
|
217
234
|
/** Run a cross-table SQL query. Returns Arrow IPC bytes. */
|
package/package.json
CHANGED