Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,sqlite,mssql,oracle,cockroach
https://xorm.io
docs | ||
examples | ||
tests | ||
xorm | ||
.gitignore | ||
.gopmfile | ||
base_test.go | ||
benchmark_base_test.go | ||
benchmark.bat | ||
benchmark.sh | ||
cache.go | ||
CONTRIBUTING.md | ||
doc.go | ||
engine.go | ||
error.go | ||
filter.go | ||
helpers.go | ||
mapper.go | ||
mssql_test.go | ||
mssql.go | ||
mymysql_test.go | ||
mymysql.go | ||
mysql_test.go | ||
mysql.go | ||
oracle.go | ||
pool.go | ||
postgres_test.go | ||
postgres.go | ||
processors.go | ||
README_CN.md | ||
README.md | ||
rows.go | ||
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
-
MsSql: github.com/lunny/godbc
Changelog
-
v0.3.1
Features:
- Support MSSQL DB via ODBC driver (github.com/lunny/godbc);
- Composite Key, using multiple pk xorm tag
- Added Row() API as alternative to Iterate() API for traversing result set, provide similar usages to sql.Rows type
- ORM struct allowed declaration of pointer builtin type as members to allow null DB fields
- Before and After Event processors
Improvements:
- Allowed int/int32/int64/uint/uint32/uint64/string as Primary Key type
- Performance improvement for Get()/Find()/Iterate()
Installation
If you have gopm installed,
gopm get github.com/lunny/xorm
Or
go get github.com/lunny/xorm
Documents
Cases
Todo
Discuss
Please visit Xorm on Google Groups
Contributors
If you want to pull request, please see CONTRIBUTING
LICENSE
BSD License http://creativecommons.org/licenses/BSD/