summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Nick Downing [Fri, 7 Jan 2022 06:41:05 +0000 (17:41 +1100)]
Add json_to_logjson and logjson_to_json command line utilities
Nick Downing [Fri, 7 Jan 2022 06:20:33 +0000 (17:20 +1100)]
Fix minor bugs
Nick Downing [Fri, 7 Jan 2022 05:31:14 +0000 (16:31 +1100)]
Add packaging
Nick Downing [Fri, 7 Jan 2022 05:29:18 +0000 (16:29 +1100)]
Rename abstract parent class of Lazy(Array|Object) from Lazy to LazyValue
Nick Downing [Fri, 7 Jan 2022 05:27:22 +0000 (16:27 +1100)]
Break into separate source files per object
Nick Downing [Fri, 7 Jan 2022 05:18:29 +0000 (16:18 +1100)]
Move a.mjs, b.mjs, json and logjson files into /tests
Nick Downing [Fri, 7 Jan 2022 05:10:43 +0000 (16:10 +1100)]
Make writing use blocks >= 16 kbytes where possible
Nick Downing [Fri, 7 Jan 2022 05:02:08 +0000 (16:02 +1100)]
Add write list
Nick Downing [Fri, 7 Jan 2022 04:10:16 +0000 (15:10 +1100)]
Add read cache
Nick Downing [Fri, 7 Jan 2022 00:07:54 +0000 (11:07 +1100)]
Make snapped references to Lazy(Array|Object) in the tree be stored as the Lazy(Array|Object) ref directly rather than [ptr, len, ref], since ptr, len not used
Nick Downing [Thu, 6 Jan 2022 23:52:14 +0000 (10:52 +1100)]
Rename LazyXXX.flush() to LazyXXX.commit(), make LazyXXX.commit() write itself to disk instead of relying on parent to do so (because there is no longer any need for special handling of the root object to put < > around it since the < > will now surround a [ptr, len] record rather than the root object itself), fix semantics of LazyArray.delete() and LazyArray.pop() so length behaves like Array
Nick Downing [Thu, 6 Jan 2022 23:27:07 +0000 (10:27 +1100)]
Remove the awkward ptr === -1 logic in commit(), flush() routines, since it is now guaranteed that if ptr === -1 the subtree must have been dirty and written
Nick Downing [Thu, 6 Jan 2022 23:24:56 +0000 (10:24 +1100)]
When placing a Lazy(Array|Object) into the tree, copy its [ptr, len] into the parent if available, this means that if a subtree is moved from one spot to another the subtree will only need to be rewritten if modified as well (if subtree is not modified, parent can just use a reference to the existing on-disk subtree)
Nick Downing [Thu, 6 Jan 2022 23:17:16 +0000 (10:17 +1100)]
Store the [ptr, len] reference in the Lazy(Array|Object) instead of dirty flag (when set to null instead of [ptr, len] it means that the contents are dirty)
Nick Downing [Thu, 6 Jan 2022 22:50:51 +0000 (09:50 +1100)]
Rationalize how root is stored to make it more like an item of an array or object (if primitive, stored directly, otherwise as a [ptr, len] reference array)
Nick Downing [Thu, 6 Jan 2022 08:32:13 +0000 (19:32 +1100)]
Implement Database.(read|write)() to reduce duplication and allow caching later
Nick Downing [Thu, 6 Jan 2022 01:44:17 +0000 (12:44 +1100)]
Make a Transaction object, temporarily removes caching ability (Transaction object and all cached read/write data is thrown away at the end of a transaction)
Nick Downing [Wed, 5 Jan 2022 03:21:08 +0000 (14:21 +1100)]
Make LazyXXX an inner object of Database, so that LazyXXX.database is set at construction time, doesn't change thereafter, and must match when building trees
Nick Downing [Wed, 5 Jan 2022 03:08:43 +0000 (14:08 +1100)]
Rename (F|f)ile to (D|d)atabase
Nick Downing [Wed, 5 Jan 2022 01:43:40 +0000 (12:43 +1100)]
Reinstate primitive object optimization
Nick Downing [Wed, 5 Jan 2022 01:41:47 +0000 (12:41 +1100)]
Implement dirty flag, to prepare for reinstating primitive object optimization
Nick Downing [Wed, 5 Jan 2022 01:21:36 +0000 (12:21 +1100)]
Allow for nonexistent root item, make get() default value be written back
Nick Downing [Wed, 5 Jan 2022 01:08:21 +0000 (12:08 +1100)]
Get lazy writing working
Nick Downing [Wed, 5 Jan 2022 00:24:32 +0000 (11:24 +1100)]
Temporarily remove optimization of writing primitive JSON values directly, so that all children of array or object consist of a [ptr, len] redirection record
Nick Downing [Tue, 4 Jan 2022 11:29:09 +0000 (22:29 +1100)]
Get lazy reading working
Nick Downing [Tue, 4 Jan 2022 08:28:58 +0000 (19:28 +1100)]
Put methods into a class called logjson.File
Nick Downing [Tue, 4 Jan 2022 04:15:24 +0000 (15:15 +1100)]
Initial commit, can read and write a JSON tree in log style and append to a log