{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:golang/github.com/sxwebdev/chaindb","name":"github.com/sxwebdev/chaindb","description":"Package chaindb provides a high-performance, thread-safe key-value database\nabstraction built on top of Pebble DB (CockroachDB's LSM-based storage engine).\nIt is specifically optimized for blockchain applications and other use cases\nrequiring atomic batch operations, efficient state management, and safe concurrent access.\n\nChainDB wraps Pebble DB to provide:\n\nBasic usage:\n\nTables provide logical separation of data using key prefixes.\nAll keys in a table are automatically prefixed, and the prefix\nis transparently stripped when reading:\n\nBatches accumulate multiple operations and apply them atomically.\nAll batch types are fully thread-safe - multiple goroutines can\nsafely call Put/Delete concurrently without external locking:\n\nFor atomic updates across multiple tables, use a shared batch:\n\nIterators allow sequential access to key-value pairs.\nFor tables, key prefixes are automatically stripped:\n\nRange iteration with bounds:\n\nNote: Iterators are NOT thread-safe individually, but multiple\niterators can exist and operate concurrently on the same database.\n\nThe database can be configured with various options:\n\nAvailable options:\n\nCompaction flattens the LSM tree, reducing space and improving read performance:\n\nForce WAL flush to disk:\n\nGet database statistics:\n\nAccess underlying Pebble instance (for advanced use cases):\n\nChainDB provides the following thread-safety guarantees:\n\nThe package defines the following errors:\n\nAdvantages:\n\nConsiderations:\n\nThe package provides helpful constants:\n\nExample usage:","license":"https://spdx.org/licenses/MIT","codeRepository":"https://github.com/sxwebdev/chaindb","issueTracker":"https://github.com/sxwebdev/chaindb/issues","url":"https://github.com/sxwebdev/chaindb","programmingLanguage":{"@type":"ComputerLanguage","name":"Go"},"dateModified":"2026-01-30","datePublished":"2026-01-30","softwareHelp":{"@type":"WebSite","url":"https://pkg.go.dev/github.com/sxwebdev/chaindb#section-documentation"},"applicationCategory":"go","runtimePlatform":"go","developmentStatus":"active","sameAs":["https://pkg.go.dev/github.com/sxwebdev/chaindb"]}