MDB_CREATE top-level constant

int const MDB_CREATE

/ Creates the named database if it doesn't exist.

When used:

  • Automatically creates missing databases
  • Fails if database exists
  • Not allowed in read-only mode

Common usage scenarios:

  • Initial database setup
  • Dynamic database creation
  • Application initialization

Example:

await db.init(path,
    flags: LMDBFlagSet()..add(MDB_CREATE));

Restrictions:

  • Incompatible with MDB_RDONLY
  • Requires write permissions
  • Only for new databases

Implementation

const MDB_CREATE = bindings.MDB_CREATE;