Skip to content

hhindriks/gorm-firebird

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gorm-firebird

GORM firebird driver (for Firebird 3.0)

import:

"github.com/flylink888/gorm-firebird"

Example:

var products []Product
dsn := "SYSDBA:[email protected]/sysdb?charset=utf8"
db, err := gorm.Open(firebird.Open(dsn), &gorm.Config{
   NamingStrategy: firebird.NamingStrategy{},  //这个很重要
})
if err != nil {
	fmt.Println(err)
}
type Product struct {
Pid  string `gorm:"primaryKey"`
Name string
}
//这个不是必需的
func (Product) TableName() string {
return "PRODUCT"
}

About

Gorm firebird driver

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%