Current behavior
Node has an internal string length limit, meaning that any data larger than 2GB. will fail with a string length error, when we run JSON.parse here https://github.com/LokiJS-Forge/LokiDB/blob/master/packages/loki/src/loki.ts#L687
Expected behavior
Any size of data will be eventually serialized without error
What is the motivation / use case for changing the behavior?
Allow the batch insert of large quantities of data greater than 2GB
Environment
LokiDB version: 2.1.0
Node v14.17.0
Others:
- We could add an explicit batch length like knex does in their `batchInsert` method https://knexjs.org/
- We could internal batch inserts with an arbitrary value than can be overridden in DB config e.g batches of 10,000
Current behavior
Node has an internal string length limit, meaning that any data larger than 2GB. will fail with a string length error, when we run
JSON.parsehere https://github.com/LokiJS-Forge/LokiDB/blob/master/packages/loki/src/loki.ts#L687Expected behavior
Any size of data will be eventually serialized without error
What is the motivation / use case for changing the behavior?
Allow the batch insert of large quantities of data greater than 2GB
Environment