A simple no-SQL database inspired by SQLite .
- Easy to Install as a library
- Easy to use
- Easy to visualize using JSON
- safe DB access through mutex's
go get github.com/abhinav-TB/dantdb
package main
import (
"fmt"
"log"
"github.com/abhinav-TB/dantdb"
)
type Student struct {
Name string
RollNo int
}
func main() {
dir := "./"
db, err := dantdb.New(dir) // creates a new database
if err != nil {
log.Fatal(err)
}
db.Write("students", "John", Student{ // writes to the database
Name: "John",
RollNo: 21,
})
record := Student{}
err = db.Read("students", "John", &record)
if err != nil { // reads from the database
log.Fatal(err)
}
fmt.Println(record)
}
More examples can be found in the examples directory
Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request
IlliaFox |
---|
MIT © Abhinav TB