qvdjs 2.0.4 → 2.0.6

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 CHANGED
@@ -191,12 +191,13 @@ console.log(df.loadStats);
191
191
  // { symbolTableBytes, totalRows, rowsLoaded, offset, symbolFiltering, symbolsKept }
192
192
  ```
193
193
 
194
- **Above 2 GiB a full load cannot work at all** — Node caps `fs.readFile` there and it fails with a
195
- raw `RangeError`. A windowed read is not an optimisation above that boundary, it is the only way in.
194
+ **The limit is memory, not file size.** A read holds the symbols of the fields it reads and what it
195
+ builds — the rows, or the columns — and reads the records a slice at a time rather than holding the file.
196
+ So a QVD of any size can be read whole when its result fits, and `iterate()` over one holds those symbols
197
+ and two chunks of rows. A read with `fields` never reads the other fields' symbols at all.
196
198
 
197
- Below it the limit is memory rather than file size, and a read too large to fit throws a **catchable**
198
- `QvdValidationError` carrying a row count that would have fitted, instead of a fatal
199
- `Reached heap limit` that no `try`/`catch` can intercept:
199
+ A read too large to fit throws a **catchable** `QvdValidationError` carrying a row count that would have
200
+ fitted, instead of a fatal `Reached heap limit` that no `try`/`catch` can intercept:
200
201
 
201
202
  ```javascript
202
203
  try {
@@ -281,7 +282,6 @@ Honest boundaries rather than an issue list — these are the ones that change w
281
282
 
282
283
  | Limitation | What it means in practice |
283
284
  | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
284
- | **Full loads stop at 2 GiB** | Use a windowed read or `iterate()` above that. Failure is a raw Node `RangeError`, not a `QvdError`. |
285
285
  | **The symbol table is always parsed in full** | `{offset, limit}`, `iterate()` and `QvdColumnTable` all avoid materialising rows, but none is constant-memory in the size of a high-cardinality file. |
286
286
  | **A killed process can leave a temporary file** | A write builds `<name>.qvdjs-<hex>.tmp` beside the QVD and removes it however the write ends — unless the process is killed outright, or the removal is itself refused, in which case the error names the file in `context.temporaryFile`. The QVD is untouched either way, and such a file can be deleted. `{atomic: false}` writes none when it rewrites a QVD that exists, and damages the QVD instead; a QVD that does not exist yet is renamed into place in either mode. |
287
287
  | **The writer takes numbers, strings, dual values and `null`** | Anything else - a `Date`, a boolean, an array, a `QvdSymbol` - is refused with a `QvdValidationError` naming the field and the row. Convert first: a `Date` to `new QvdDual(dateToQlikSerial(date), text)`, the serial and the text Qlik shows, which is how Qlik stores a date; a boolean to `-1` and `0`, as a Qlik comparison stores it. |