Skip to content

unum-cloud/go-ustore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UKV GoLang SDK

GoLang bindings are implemented using cGo. The language lacks operator and function overloads, so we can't mimic native collections. Instead we mimic the interfaces of most commonly used ORMs.

db := DataBase{}
db.Reconnect()
db.Set(42, &[]byte{4, 2})
db.Get(42)

Implementation-wise, GoLang variant performs memcpys on essentially every call. As GoLang has no exceptions in the classical OOP sense, most functions return multiple values, error being the last one in each pack. Batch lookup operations are implemented via channels sending slices, to avoid reallocations.