Awesome Go

lotusdb

CategoryDatabase
SubcategoryDatabases Implemented in Go
Stars0

Fast k/v database compatible with lsm and b+tree

About lotusdb

lotusdb-logo.png

What is LotusDB

LotusDB is the most advanced key-value store written in Go, extremely fast, compatible with LSM tree and B+ tree, and optimization of badger and bbolt.

Key features:

  • Combine the advantages of LSM and B+ tree
  • Fast read/write performance
  • Much lower read and space amplification than typical LSM

Design Overview

Getting Started

package main

import (
	"github.com/lotusdblabs/lotusdb/v2"
)

func main() {
	// specify the options
	options := lotusdb.DefaultOptions
	options.DirPath = "/tmp/lotusdb_basic"

	// open a database
	db, err := lotusdb.Open(options)
	if err != nil {
		panic(err)
	}
	defer func() {
		_ = db.Close()
	}()

	// put a key
	err = db.Put([]byte("name"), []byte("lotusdb"))
	if err != nil {
		panic(err)
	}

	// get a key
	val, err := db.Get([]byte("name"))
	if err != nil {
		panic(err)
	}
	println(string(val))

	// delete a key
	err = db.Delete([]byte("name"))
	if err != nil {
		panic(err)
	}
}

see the examples for more details.

Community

Welcome to join the Slack channel and Discussions to connect with LotusDB team members and other users.

If you are a Chinese user, you are also welcome to join our WeChat group, scan the QR code and you will be invited:

Frequently Asked Questions

What is lotusdb?

lotusdb is a Database library for the Go programming language. Fast k/v database compatible with lsm and b+tree

How do I install lotusdb?

Install lotusdb with the Go module system using `go get flower-corp/lotusdb`. Check the repository for the current installation instructions.

What category does lotusdb belong to?

lotusdb is listed under Database, specifically Databases Implemented in Go.

← Back to Databases Implemented in Go