Skip to content

Releases: cubrid-lab/gorm-cubrid

v0.1.0 — GORM Dialect for CUBRID

Choose a tag to compare

@yeongseon yeongseon released this 14 Mar 13:29

v0.1.0 — GORM Dialect for CUBRID

A GORM dialect for CUBRID database, providing full ORM support with schema migration.

Features

  • Open(dsn) and New(config) constructors
  • Full gorm.Dialector interface: DataTypeOf, BindVarTo, QuoteTo, Explain, DefaultValueOf
  • CUBRID-specific Migrator: CurrentDatabase, GetTables, HasTable, HasColumn, HasIndex, ColumnTypes, RenameTable, DropIndex, AlterColumn
  • MySQL-compatible ? positional placeholders
  • Backtick identifier quoting
  • 38 unit tests (no CUBRID server required)

Install

go get github.com/cubrid-labs/gorm-cubrid

Quick Start

import (
    "gorm.io/gorm"
    cubrid "github.com/cubrid-labs/gorm-cubrid"
)

db, err := gorm.Open(cubrid.Open("CUBRID:localhost:33000:demodb:::"), &gorm.Config{})

Requirements

  • Go 1.21+
  • GORM v1.25+
  • CUBRID 11.2+