https://github.com/c0deltin/duckdb-driver
DuckDB driver for gorm.io.
https://github.com/c0deltin/duckdb-driver
duckdb gorm gorm-duckdb-driver
Last synced: 2 months ago
JSON representation
DuckDB driver for gorm.io.
- Host: GitHub
- URL: https://github.com/c0deltin/duckdb-driver
- Owner: c0deltin
- Created: 2022-10-22T15:31:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-22T17:00:06.000Z (over 2 years ago)
- Last Synced: 2025-03-24T22:30:38.263Z (2 months ago)
- Topics: duckdb, gorm, gorm-duckdb-driver
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GORM DuckDB Driver
A DuckDB driver for [gorm.io](https://gorm.io/).
## Quickstart
```go
import (
"github.com/c0deltin/duckdb-driver"
"gorm.io/gorm"
)db, err := gorm.Open(duckdb.Open("path/to/database.db"))
```## Datatypes
### Lists
````go
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
> :warning: **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](https://github.com/marcboeker/go-duckdb).
Please take care of the instructions there, before compiling.