Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,sqlite,mssql,oracle,cockroach
https://xorm.io
docs | ||
examples | ||
xorm | ||
.gitignore | ||
.gopmfile | ||
base_test.go | ||
benchmark_base_test.go | ||
cache.go | ||
doc.go | ||
engine.go | ||
error.go | ||
filter.go | ||
helpers.go | ||
mapper.go | ||
mymysql_test.go | ||
mymysql.go | ||
mysql_test.go | ||
mysql.go | ||
pool.go | ||
postgres_test.go | ||
postgres.go | ||
README_CN.md | ||
README.md | ||
session.go | ||
sqlite3_test.go | ||
sqlite3.go | ||
statement.go | ||
table.go | ||
VERSION | ||
xorm.go |
Xorm is a simple and powerful ORM for Go.
Features
-
Struct <-> Table Mapping Support
-
Chainable APIs
-
Transaction Support
-
Both ORM and raw SQL operation Support
-
Sync database sechmea 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:
-
MyMysql: github.com/ziutek/mymysql/godrv
-
SQLite: github.com/mattn/go-sqlite3
-
Postgres: github.com/lib/pq
Changelog
- v0.2.3 : Improved documents; Optimistic Locking support; Timestamp with time zone support; Mapper change to tableMapper and columnMapper & added PrefixMapper & SuffixMapper support custom table or column name's prefix and suffix;Insert now return affected, err instead of id, err; Added UseBool & Distinct;
- v0.2.2 : Postgres drivers now support lib/pq; Added method Iterate for record by record to handler;Added SetMaxConns(go1.2+) support; some bugs fixed.
- v0.2.1 : Added database reverse tool, now support generate go & c++ codes, see Xorm Tool README; some bug fixed.
- v0.2.0 : Added Cache supported, select is speeder up 3~5x; Added SameMapper for same name between struct and table; Added Sync method for auto added tables, columns, indexes;
Installation
go get github.com/lunny/xorm
Documents
Cases
Discuss
Please visit Xorm on Google Groups
LICENSE
BSD License http://creativecommons.org/licenses/BSD/