A database system based around the idea of append-only, unchanging data.
Returns all items, in chronological order, from one ink sack (table)
Appends a piece of data to a specific ink-sack
Like append, but will (attempt) to place the data at a specific point. No promises of support though.
removes all data between those points. Ideal for removing expired data.
Start by creating a new InkDB (or loading) within your code.
//something that needs storage
ink, err := inkdb.NewInkDB(path.Join(os.Getwd(), "<where it should live>"))
if err!=nil{
//or figure out how to handle the error. I write the library, not the rules here.
panic(err)
}
type placeholderStorage struct{
ExportableType string
}
ink.NewTable("whatever you want to name it", &placeholderStorage{})
ink.Append("whatever you named it", &palceholderStorage{"hello world"})
I need to add some thread safety, but each query should (ideally) be able to be run in its own thread.
Warning
Each inksack(table), makes its own folder for storing. There is no check for storage availability. currently, each table needs all its contents in the same folder location. If I change that, to allow multiple file locations, we can have redundancy files, as well as tables that take up multiple storage devices.
Warning
I wouldn't even count this as supporting MacOS yet. Use at your own risk.