duckdb-driver

module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2024 License: MIT

README

GORM DuckDB Driver

A DuckDB driver for gorm.io.

Quickstart

import (
    "github.com/c0deltin/duckdb-driver"
    "gorm.io/gorm"
)

db, err := gorm.Open(duckdb.Open("path/to/database.db"))

Datatypes

Lists
type Entity struct {
	// use types.StringArray for a list of strings
	StringList types.StringArray `gorm:"type:varchar[]"`
	// use types.Int32Array for a list of integers
	IntList    types.Int32Array  `gorm:"type:integer[]"`
}

Notice

This repository is in a non-stable status. Some features of DuckDB are not implemented yet or untested.

This package imports github.com/marcboeker/go-duckdb.
Please take care of the instructions there, before compiling.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL