XORM(ORM Framework)

XORM(ORM Framework) wiki, XORM(ORM Framework) history, XORM(ORM Framework) review, XORM(ORM Framework) facts XORM(ORM Framework) news, what is XORM(ORM Framework) XORM(ORM Framework) wikipedia
0 XORM(ORM Framework) information, XORM(ORM Framework) definition, XORM(ORM Framework) timeline, XORM(ORM Framework) location


Xorm [10] [11] ​ is a simple and powerful ORM for Go.


  • Struct <-> Table Mapping Support
  • Chainable APIs
  • Transaction Support
  • Both ORM and raw SQL operation Support
  • Sync database schema Support
  • Query Cache speed up
  • Database Reverse support, See Xorm Tool README
  • Simple cascade loading support
  • Optimistic Locking support

Drivers Support

Drivers for Go’s sql package which currently support database/sql includes:

  • Mysql: github.com/go-sql-driver/mysql [1]
  • MyMysql: github.com/ziutek/mymysql/godrv [2]
  • Postgres: github.com/lib/pq [3]
  • Tidb: github.com/pingcap/tidb [4]
  • SQLite: github.com/mattn/go-sqlite3 [5]
  • MsSql: github.com/denisenkom/go-mssqldb [6]
  • MsSql: github.com/lunny/godbc [7]
  • Oracle: github.com/mattn/go-oci8 [8]
  • ql: github.com/cznic/ql [9]


If you have gopm installed

gopm get github.com/go-xorm/xorm

Or use go get

go get github.com/go-xorm/xorm

Run and setup

  1. Init orm: orm, err := xorm.NewEngine("sqlite3", "./test.db")
  2. Sync database structs: err = orm.Sync(new(User), new(Article))

Other wiki pages related to XORM(ORM Framework).