slim-storage-engine

所属分类:云数据库/云存储
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2023-12-19 11:47:36
上 传 者sh-1993
说明:  以Golang编写的用于实验和教育目的的存储引擎。Persistent BTree被编程为最小磁盘寻道。
(A storage engine written in Golang for experimental and educational purpose. Persistent BTree is programmed for minimum disk seek.)

文件列表:
collection.go
const.go
dal.go
freelist.go
go.mod
main.go
meta.go
node.go

# slimDB A storage engine written in Golang for experimental and educational purpose. Persistent BTree is programmed for minimum disk seek. ## Run Locally Clone the project ```bash git clone https://github.com/kevinjad/slim-storage-engine.git ``` Go to the project directory ```bash cd slim-storage-engine ``` Build ```bash go build ``` run example ```bash ./slim-storage-engine ``` ## Usage/Examples ```go settings := &Settings{ pageSize: os.Getpagesize(), MinFillPercent: 0.0125, MaxFillPercent: 0.025, } dal, _ := newDal("./slim.db", settings) c := newCollection([]byte("collection1"), dal.root) c.dal = dal _ = c.Put([]byte("Key1"), []byte("Value1")) item, _ := c.Find([]byte("Key1")) fmt.Printf("key is: %s, value is: %s\n", item.key, item.value) dal.writeFreelist() _ = dal.close() ```

近期下载者

相关文件


收藏者