Skip to content
Projekte

dacr/zio-lmdb has 44 GitHub stars and 2 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-24 00:37 UTC. Last push 2026-10-31.

So werden diese Zahlen gemessen

Gemessener Sternzuwachs

in 24h
0
in 7 days
0
in 15 days
Verlauf wird gesammelt
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

Über uns

Lightning Memory Database (LMDB) for scala ZIO

Daten

README.md

Original

ZIO-LMDB

scaladoc docs

Embedded, ACID, key-value database for ZIO — zero infrastructure, zero ops, just a file.

Built on lmdb-java with a type-safe, ZIO-native API:

  • Three collection kinds — LMDBCollection (1 key → 1 value), LMDBMulti (1 key → N values), LMDBIndex (1 key → N keys)
  • Customizable codecs — JSON (derives LMDBCodecJson), bytes optimized codecs for keys, or your own ones
  • Atomic transactions — single-collection or cross-collection, always consistent
  • Lexicographic ordering — keys are sorted; range scans and pagination come for free
  • Scala-CLI friendly — add one dependency line and run

Install

// sbt
libraryDependencies += "fr.janalyse" %% "zio-lmdb" % "2.8.6"

// scala-cli
//> using dep fr.janalyse::zio-lmdb:2.8.6
//> using javaOpt --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED

Quick example

import zio.*, zio.lmdb.*, zio.lmdb.json.*
import java.util.UUID

case class Person(name: String, age: Int) derives LMDBCodecJson

object Example extends ZIOAppDefault:
  def run = (for {
    people <- LMDB.collectionCreate[UUID, Person]("people", failIfExists = false)
    id     <- Random.nextUUID
    _      <- people.insert(id, Person("Alice", 30))
    _      <- people.update(id, previous => previous.copy(age = previous.age + 1))
    result <- people.fetch(id)
    _      <- Console.printLine(result)
  } yield ()).provide(LMDB.liveWithDatabaseName("my-app"), Scope.default)

Documentation

Full API reference, transactions, codecs, indexes, query DSL and configuration:
dacr.github.io/zio-lmdb

Real-world usage

Runnable snippets (scala-cli)

Ähnliche Projekte entdecken

Wird geladen…