summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/modbtree.c
Commit message (Collapse)AuthorAge
* extmod: Update for changes to mp_obj_str_get_data.Damien George2017-03-29
|
* py: Add iter_buf to getiter type method.Damien George2017-02-16
| | | | | | | | | | | | | | | Allows to iterate over the following without allocating on the heap: - tuple - list - string, bytes - bytearray, array - dict (not dict.keys, dict.values, dict.items) - set, frozenset Allows to call the following without heap memory: - all, any, min, max, sum TODO: still need to allocate stack memory in bytecode for iter_buf.
* extmod/modbtree: Rename "sync" method to "flush" for consistency.Paul Sokolovsky2016-12-05
| | | | | Rename recently introduced "sync" method to "flush" for consistency with usual files.
* extmod/modbtree: Add method to sync the database.w4kpm2016-12-02
| | | | | | | If you have longish operations on the db (such as logging data) it may be desirable to periodically sync the database to the disk. The added btree.sync() method merely exposes the berkley __bt_sync function to the user.
* extmod: Use mp_raise_OSError helper function.Damien George2016-10-07
|
* all: Remove 'name' member from mp_obj_module_t struct.Damien George2016-09-22
| | | | One can instead lookup __name__ in the modules dict to get the value.
* extmod/modbtree: do CHECK_ERROR after __bt_seq()Krzysztof Blazewicz2016-08-24
| | | | | | | In `btree_seq()`, when `__bt_seq()` gets called with invalid `flags` argument it will return `RET_ERROR` and it won't initialize `val`. If field `data` of uninitialized `val` is passed to `mp_obj_new_bytes()` it causes a segfault.
* extmod/modbtree: open(): Add option kwargs.Paul Sokolovsky2016-08-06
| | | | Namely: flags, cachesize, pagesize, minkeypage.
* extmod/modbtree: Implement __contains__ operation.Paul Sokolovsky2016-08-02
|
* extmod/modbtree: Switch to accepting stream object instead of filename.Paul Sokolovsky2016-07-31
| | | | Requires "embedded" BerkeleyDB BTree implementation.
* extmod/modbtree: Check __bt_open() return value for error.Paul Sokolovsky2016-07-24
|
* extmod/modbtree: Fixes for nanbox build.Paul Sokolovsky2016-07-02
|
* extmod/modbtree: Fix unused argument warning.Paul Sokolovsky2016-07-02
|
* extmod/modbtree: Cleverly implement "for key in btree:" syntax.Paul Sokolovsky2016-06-23
| | | | | I.e. make it work like btree.keys(), while still not using a separate iterator type.
* extmod/modbtree: Implement keys(), values(), items() iterators.Paul Sokolovsky2016-06-20
| | | | | Each takes optional args of starting key, ending key, and flags (ending key inclusive, reverse order).
* extmod/modbtree: open(): Support "in-memory" database with filename=None.Paul Sokolovsky2016-06-18
| | | | | It's not really in-memory though, just uses anonymous temporary file on disk.
* extmod/modbtree: __getitem__() should raise KeyError for non-existing key.Paul Sokolovsky2016-06-18
|
* extmod/modbtree: items(): Implement DESC flag.Paul Sokolovsky2016-06-18
|
* extmod/modbtree: items(): Implement "end key inclusive" flag.Paul Sokolovsky2016-06-17
|
* extmod/modbtree: Actually implement end key support for .items().Paul Sokolovsky2016-06-16
|
* extmod/modbtree: Implement .items() iterator.Paul Sokolovsky2016-06-16
|
* extmod/modbtree: Handle default value and error check.Paul Sokolovsky2016-06-15
|
* extmod/modbtree: Initial implementation of "btree" module based on BerkeleyDB.Paul Sokolovsky2016-06-14
This implements basic wrapping of native get/put/seq API, and then dictionary access protocol. Native API is intended to be superceded going forward.