Skip to main content

Installation

The Go bindings use CGO to link against a pre-built static library. Your final binary is fully self-contained with no external dependencies.
1

Get the package

2

Download the native library

This downloads the pre-compiled static library (.a file) for your platform from GitHub releases and caches it in lib/<platform>/.
3

Build your application

CGO statically links the library into your binary. The result is a single standalone executable with zero runtime dependencies.
Benefits:
  • Single self-contained binary
  • No external library files needed
  • Perfect for production deployment
  • Works in Docker containers, cloud functions, etc.
  • No Rust compiler needed

Quick start

API reference

Database

Opening databases

Configuration

Database info

Transaction

Creating transactions

CRUD operations

Transaction control

Always defer tx.Rollback() after creating a transaction. It’s safe to call even after a successful commit.

Collection management

Collection

For non-transactional operations with auto-commit:

Basic CRUD

Querying

Bulk operations

Advanced operations

Indexing

Schema validation

Maintenance

Error handling

All operations return Go’s standard error interface:

Requirements

  • CGO enabled (default on most systems)
  • Internet connection on first build (to download native library)
  • C compiler:
    • macOS: xcode-select --install
    • Linux: apt install build-essential or yum install gcc
    • Windows: Install MinGW-w64

Platform support

  • macOS: ARM64 (Apple Silicon) and x64 (Intel)
  • Linux: ARM64 and x64
  • Windows: x64
Windows ARM64 is not currently supported.

Troubleshooting

Library download fails

  • Ensure you have internet connectivity
  • Check that the GitHub release exists with the required files
  • Verify your platform is supported

Build fails with CGO errors

Make sure you have a C compiler installed for your platform.

Static linking fails

  • Make sure you ran go generate first
  • Check that the .a file exists: ls bindings/go/lib/*/
  • Verify you have system dependencies installed