getVersion method

String getVersion()

Gets the version string of the LMDB library.

Returns the version in format "LMDB x.y.z".

Example:

final version = db.getVersion();
print('Using LMDB version: $version');

Implementation

String getVersion() {
  final major = calloc<Int>();
  final minor = calloc<Int>();
  final patch = calloc<Int>();

  try {
    final verPtr = _lib.mdb_version(major, minor, patch);
    return verPtr.cast<Utf8>().toDartString();
  } finally {
    calloc.free(major);
    calloc.free(minor);
    calloc.free(patch);
  }
}