

GitHub - objectbox/objectbox-go: ObjectBox Go - persisting your Go structs/objec...
source link: https://github.com/objectbox/objectbox-go
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
ObjectBox Go API
ObjectBox is a superfast database for objects. Using this Golang API, you can us ObjectBox as an embedded database in your Go application. In this embedded mode, it runs within your application process.
Some features
- Object storage: put and get native Go structs
- Secondary indexes based on object properties
- Simple CRUD API
- Asynchronous puts
- Automatic model migration (no schema upgrade scripts etc.)
- (Coming soon: Powerful queries)
- (Coming soon: Relations to other objects)
Installation
To get started with ObjectBox you can get the repository code as usual with go get and install the two prerequisites - pre-compiled library and a bindings generator.
go get github.com/objectbox/objectbox-go go get github.com/google/flatbuffers/go go install github.com/objectbox/objectbox-go/cmd/objectbox-gogen/ mkdir objectboxlib && cd objectboxlib curl https://raw.githubusercontent.com/objectbox/objectbox-c/master/download.sh > download.sh bash download.sh
See installation docs for more details and further instructions.
Additionally, you can run tests to validate your installation
go test github.com/objectbox/objectbox-go/...
Upgrading to a newer version
When you want to update, please re-run the entire installation process to ensure all components are updated:
- ObjectBox itself (objectbox/objectbox-go)
- Dependencies (flatbuffers)
- libobjectbox
- ObjectBox code generator
This is important as diverging versions of any component might result in errors.
This repository also come with a install.sh
script that can be used for installation and upgrading:
~/go/src/github.com/objectbox/objectbox-go/install.sh
Docs
Documentation is still on-going work. To get started, please have a look at the examples directory and golang.objectbox.io.
Current state
As this is still an early version of the Go APIs, they are not as convenient as the Java/Kotlin APIs, which deeply integrate into the language using e.g. @Entity annotations.
A better language integration could be build based on reflection, code generation, or a combination of both.
License
Copyright 2018 ObjectBox Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Recommend
-
109
Operator to Surround a Text Object This plugin provides Vim operator mappings to deal with surrounds like (), "" and so on. In addition, both end of the text object are the same character, vim-operator-surround r...
-
127
-
408
ObjectB...
-
58
The embedded database ObjectBox now officially runs on all major desktop platforms. This enables Java-based desktop apps on Windows, macOS, and Linux to utilize ObjectBox' simplicity and performance. iOS coming next.
-
54
README.md
-
39
Today, we are bringing the power of ObjectBox to Go. Whatever solution you are building, be it a web service, an IoT/IIoT solution, or any data-driven application, you will benefit from the efficiency and speed of ObjectBox (see benchmarks below...
-
8
@obxVivienCo-Founder & CEO @ObjectBox_io >> objectbox.ioHackerNoon Reporter: Please tell us briefly about your background.My name is Vivien, I...
-
6
Chapter 17 of Let’s Understand Chrome V8: JavaScript object memory layout and new method. Welcome to other chapters of Let’s Understand Chrome V8
-
12
Ruby adds a new core class called Data to represent simple immutable value objects Nov 22, 2022 , by Swaathi Kakarla 4 minut...
-
6
What not to forget when implementing a pattern-matching in Ruby for custom objects Dec 20, 2022
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK