ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - objectbox/objectbox-go: Embedded Go Database, the fast alternative to SQLite, gorm, etc.
Embedded Go Database, the fast alternative to SQLite, gorm, etc. - objectbox/objectbox-go
Visit Site

GitHub - objectbox/objectbox-go: Embedded Go Database, the fast alternative to SQLite, gorm, etc.

GitHub - objectbox/objectbox-go: Embedded Go Database, the fast alternative to SQLite, gorm, etc.

ObjectBox Go Database - simple but powerful; frugal but fast

The Golang database is easy to use via an intuitive native Golang API and persists objects superfast and sustainably.
Go and check out the performance benchmarks vs SQLite (GORM) & Storm.

ObjectBox persists your native Go structs using a simple CRUD API:

id, err := box.Put(&Person{ FirstName: "Joe", LastName:  "Green" })

Want details? Read the docs or check out the API reference.

Latest release: v1.8.1 (2024-08-29)

Table of Contents:

High-performance Go database

๐Ÿ High performance on restricted devices, like IoT gateways, micro controllers, ECUs etc.
๐Ÿ’š Resourceful with minimal CPU, power and Memory usage for maximum flexibility and sustainability
๐Ÿ”— Relations: object links / relationships are built-in
๐Ÿ’ป Multiplatform: Linux, Windows, Android, iOS, macOS

๐ŸŒฑ Scalable: handling millions of objects resource-efficiently with ease
๐Ÿ’ Queries: filter data as needed, even across relations
๐Ÿฆฎ Statically typed: compile time checks & optimizations
๐Ÿ“ƒ Automatic schema migrations: no update scripts needed

And much more than just data persistence
๐Ÿ‘ฅ ObjectBox Sync: keeps data in sync between devices and servers
๐Ÿ•’ ObjectBox TS: time series extension for time based data

Getting started: Go!

To install ObjectBox, execute the following command in your project directory. You can have a look at installation docs for more details and further instructions.

bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-go/main/install.sh)

To install ObjectBox Sync variant of the library, pass --sync argument to the command above:

bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-go/main/install.sh) --sync

You can run tests to validate your installation

go test github.com/objectbox/objectbox-go/...

With the dependencies installed, you can start adding entities to your project:

//go:generate go run github.com/objectbox/objectbox-go/cmd/objectbox-gogen
โ€‹
type Task struct {
	Id   uint64
	Text string
}

And run code generation in your project dir

go generate ./...

This generates a few files in the same folder as the entity - remember to add those to version control (e. g. git).

Once code generation finished successfully, you can start using ObjectBox:

obx := objectbox.NewBuilder().Model(ObjectBoxModel()).Build()
box := BoxForTask(obx) // Generated function to provide a Box for Task objects
id, _ := box.Put(&Task{ Text: "Buy milk" })

See the Getting started section of our docs for a more thorough intro.

Also, please have a look at the examples directory and for the API reference see ObjectBox GoDocs - and the sources in this repo.

Already using ObjectBox Database?

Your opinion matters to us! Please fill in this 2-minute Anonymous Feedback Form.

We believe, ObjectBox is super easy to use. We are on a mission to make developersโ€™ lives better, by building developer tools that are intuitive and fun to code with. To do that, we want your feedback: what do you love? What's amiss? Where do you struggle in everyday app development?

We're looking forward to receiving your comments and requests:

  • Add GitHub issues
  • Upvote issues you find important by hitting the ๐Ÿ‘/+1 reaction button
  • Drop us a line via @ObjectBox_io
  • โญ us, if you like what you see

Thank you! ๐Ÿ™

Keep in touch: For general news on ObjectBox, check our blog!

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)
  • ObjectBox library (libobjectbox.so|dylib; objectbox.dll)
  • ObjectBox code generator

This is important as diverging versions of any component might result in errors.

The install.sh script can also be used for upgrading:

bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-go/main/install.sh)

Afterwards, don't forget to re-run the code generation on your project

go generate ./...

Other languages/bindings

ObjectBox supports multiple platforms and languages:

License

Copyright 2018-2024 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.

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory