LMDBConfig class

Configuration and utility functions for LMDB (Lightning Memory-Mapped Database)

This class provides utilities for:

  • Calculating optimal database sizes
  • Analyzing database efficiency
  • Managing database configurations

Constructors

LMDBConfig.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

analyzeEfficiency(DatabaseStats stats) DatabaseEfficiency
/ Analyzes database efficiency and returns structured metrics.
analyzeUsage(DatabaseStats stats) String
Analyzes current database usage and returns a formatted string report.
calculateMapSize({required int expectedEntries, required int averageKeySize, required int averageValueSize, double overheadFactor = defaultOverheadFactor}) int
Calculates required map size based on expected data volume.
calculateMaxEntries({required int mapSize, required int averageKeySize, required int averageValueSize, double overheadFactor = defaultOverheadFactor}) int
Calculates the maximum possible entries for a given map size.

Constants

defaultOverheadFactor → const double
Default overhead factor for B+ tree structure and future growth. A factor of 1.5 means 50% extra space is reserved for the B+ tree structure.
minMapSize → const int
Minimum map size in bytes (1MB). The database cannot be smaller than this value.