LMDBFlagSet class

A class for managing LMDB flag combinations in a type-safe way.

This class provides methods to combine, check and manipulate LMDB flags that control various aspects of database behavior. It handles the bitwise operations internally and provides a clean interface for Dart code.

Example:

// Create a custom flag set
final flags = LMDBFlagSet()
  ..add(MDB_NOSUBDIR)
  ..add(MDB_NOSYNC);

// Or use predefined combinations
final readOnlyFlags = LMDBFlagSet.readOnly;

Constructors

LMDBFlagSet()
Creates an empty flag set with no flags set.
LMDBFlagSet.fromFlags(int _flags)
Creates a flag set initialized with the provided flags value.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → int
Gets the combined value of all flags in this set.
no setter

Methods

add(int flag) → void
Adds a flag to the set using bitwise OR operation.
contains(int flag) → bool
Checks if a specific flag is set in this flag set.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(int flag) → void
Removes a flag from the set using bitwise operations.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

defaultFlags → LMDBFlagSet
Creates a flag set with default settings.
no setter
highPerformance → LMDBFlagSet
Creates a flag set optimized for high performance operations.
no setter
readOnly → LMDBFlagSet
Creates a flag set for read-only database access.
no setter
readOnlyFromAssets → LMDBFlagSet
Creates a flag set for read-only access to a database file in an unwritable directory.
no setter