Proyectos
Ver en GitHub
dacr/zio-lmdb
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-22 22:39 UTC. Last push 2026-10-31.
Crecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Recopilando historial
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
Acerca de
Lightning Memory Database (LMDB) for scala ZIO
DatosREADME.md
OriginalEmbedded, 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
- sotohp — photo management, uses zio-lmdb intensively
- code-examples-manager — snippets and gist management
- zwords — a Wordle-like game (play it)
Runnable snippets (scala-cli)
Explorar proyectos relacionados
Cargando…