Home Applications gorm-iris

gorm-iris

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
0
0 reviews
0
Awards
12
Views
0
IPM installs
0
0
Details
Releases (1)
Reviews
Issues
InterSystems IRIS Dialect for GORM - ORM library for Golang

What's new in this version

Initial Release

gorm-iris

GORM dialect for InterSystems IRIS built on top of go-irisnative.

Status: alpha. APIs may change. Feedback and PRs welcome.


Installation

go get github.com/caretdev/gorm-iris

DSN format

The DSN is the same as for go-irisnative:

iris://user:password@host:1972/Namespace

Example:

export IRIS_DSN='iris://_SYSTEM:SYS@localhost:1972/USER'

Quick start

package main

import (
"fmt"
"gorm.io/gorm"
iris "github.com/caretdev/gorm-iris" // import dialect
)

type Person struct {
ID int gorm:"primaryKey"
Name string
}

func main() {
dsn := "iris://_SYSTEM:SYS@localhost:1972/USER"
db, err := gorm.Open(iris.Open(dsn), &gorm.Config{})
if err != nil { panic(err) }

// Auto-migrate schema
db.AutoMigrate(&Person{})

// Insert
db.Create(&Person{ID: 1, Name: "Alice"})

// Query
var p Person
db.First(&p, 1)
fmt.Println("Found:", p)

// Update
db.Model(&p).Update("Name", "Alice Updated")

// Delete
db.Delete(&p)

}


Features

  • ✅ Drop-in GORM support for InterSystems IRIS
  • ✅ Schema migration (AutoMigrate)
  • ✅ CRUD operations
  • ✅ Transactions
  • ✅ Based on database/sql driver (go-irisnative)

Compatibility

  • Go: 1.21+
  • GORM: v2
  • InterSystems IRIS: 2022.1+

License

MIT License


Contributing

  • Please run go vet and go test ./... before PRs.
  • Document any missing IRIS-specific features or differences.
  • Add examples for advanced GORM patterns as tested.
Version
0.1.104 Oct, 2025
Ideas portal
Category
Developer Environment
Works with
InterSystems IRIS
First published
04 Oct, 2025
Last edited
04 Oct, 2025