© 2025 InterSystems Corporation, Cambridge, MA. All rights reserved.Privacy & TermsGuaranteeSection 508Contest Terms
Initial Release
GORM dialect for InterSystems IRIS built on top of go-irisnative.
Status: alpha. APIs may change. Feedback and PRs welcome.
go get github.com/caretdev/gorm-iris
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'
package main
import (
"fmt"
"gorm.io/gorm"
iris "github.com/caretdev/gorm-iris" // import dialect
)type Person struct {
ID intgorm:"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)
}
AutoMigrate
)database/sql
driver (go-irisnative
)MIT License
go vet
and go test ./...
before PRs.