Code Monkey home page Code Monkey logo

objectbox-go's Introduction

ObjectBox Go API

ObjectBox is a superfast database for objects. Using this Golang API, you can use ObjectBox as an embedded database in your Go application. A client/server mode will follow soon.

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: v0.7.1 (2018-11-30)

Some features

  • Queries
  • Secondary indexes based on object properties
  • 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

To get started, please have a look at the examples directory and ObjectBox Go docs.

Also, check the ObjectBox GoDocs - and the sources in this repo.

Documentation is still on-going work; expect more soon.

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.

objectbox-go's People

Contributors

greenrobot avatar vaind avatar velikanov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.