Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 631 Bytes

README.md

File metadata and controls

16 lines (13 loc) · 631 Bytes

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.