Kong / Kong/lua-resty-lmdb

Feature request: Add ability to specify MDB_INTEGERKEY, MDB_INTEGERDUP and MDB_DUPFIXED flags

Open
#63 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
33
Forks
8
Avg merge
8d 1h
Merged PRs (30d)
1

Description

would it be possible for `txn:db_open(create, db?)` to get a few more parameters to enable using LMDB native integer keys?

something similar to this patch for the `py-lmdb` project:
https://github.com/jnwatson/py-lmdb/pull/94/commits/d3fc35a33b49c8fc1be36993cc2c57f6ed5a44fb

perhaps something like this:
```
txn:db_open(create, db?, integerkey?, integerdup?, dupfixed?)
```
with each of the new optional parameters defaulting to `false`

I would submit a pull request if it were not above my pay grade ;)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the txn:db_open(create, db?) API and compare the requested behavior with the referenced py-lmdb patch. Trace how the existing optional arguments reach LMDB, then verify that integerkey, integerdup, and dupfixed default to false and enable the corresponding flags when set.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
api, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.