readOnlyFromAssets property
LMDBFlagSet
get
readOnlyFromAssets
Creates a flag set for read-only access to a database file in an unwritable directory.
This combination is particularly useful when accessing a database from an asset directory or other read-only location. It combines:
- MDB_RDONLY: For read-only access
- MDB_NOSUBDIR: Treat the path as the database file itself
- MDB_NOLOCK: Don't lock the database file
This is commonly used in mobile applications where the database might be bundled with the application in a read-only location.
Implementation
static LMDBFlagSet get readOnlyFromAssets => LMDBFlagSet()
..add(MDB_RDONLY)
..add(MDB_NOSUBDIR)
..add(MDB_NOLOCK);