Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,sqlite,mssql,oracle,cockroach https://xorm.io
Go to file
2013-10-15 10:40:21 +08:00
docs Added database reverse tool, now support generate go & c++ codes, some bug fixed. 2013-10-15 10:40:21 +08:00
examples added xorm reverse tool 2013-10-12 23:16:51 +08:00
xorm added single file support 2013-10-14 18:00:01 +08:00
.gitignore fix mysql test and sqlite test 2013-05-06 16:01:17 +08:00
base_test.go added xorm reverse tool 2013-10-12 23:16:51 +08:00
benchmark_base_test.go Added support for Find(*[]*Struct); added notnull; 2013-10-05 00:44:43 +08:00
cache.go cache bug fixed 2013-10-02 11:04:20 +08:00
doc.go improved doc.go 2013-10-07 12:07:35 +08:00
engine.go added xorm reverse tool 2013-10-13 23:57:57 +08:00
error.go added xorm reverse tool 2013-10-12 23:16:51 +08:00
filter.go add Sync() method for sync column, index to table 2013-09-28 23:14:42 +08:00
helpers.go improved docs 2013-09-30 09:17:35 +08:00
install reverse tool improved 2013-10-14 15:40:24 +08:00
mapper.go added xorm reverse tool 2013-10-12 23:16:51 +08:00
mymysql_test.go Added support for Find(*[]*Struct); added notnull; 2013-10-05 00:44:43 +08:00
mymysql.go added xorm reverse tool 2013-10-12 23:16:51 +08:00
mysql_test.go Added support for Find(*[]*Struct); added notnull; 2013-10-05 00:44:43 +08:00
mysql.go added genJson for xorm tool 2013-10-14 17:46:04 +08:00
pool.go improved docs 2013-09-30 14:45:34 +08:00
postgres_test.go Added support for Find(*[]*Struct); added notnull; 2013-10-05 00:44:43 +08:00
postgres.go added genJson for xorm tool 2013-10-14 17:46:04 +08:00
README_CN.md Added database reverse tool, now support generate go & c++ codes, some bug fixed. 2013-10-15 10:40:21 +08:00
README.md Added database reverse tool, now support generate go & c++ codes, some bug fixed. 2013-10-15 10:40:21 +08:00
session.go Added database reverse tool, now support generate go & c++ codes, some bug fixed. 2013-10-15 10:40:21 +08:00
sqlite3_test.go add Sync() method for sync column, index to table 2013-09-28 23:14:42 +08:00
sqlite3.go Added database reverse tool, now support generate go & c++ codes, some bug fixed. 2013-10-15 10:40:21 +08:00
statement.go added xorm reverse tool 2013-10-12 23:16:51 +08:00
table.go reverse tool improved 2013-10-14 15:40:24 +08:00
VERSION many bugs fixed 2013-09-26 15:19:39 +08:00
xorm.go added xorm reverse tool 2013-10-12 23:16:51 +08:00

xorm

中文

Xorm is a simple and powerful ORM for Go. It makes dabatabse operating simple.

Build Status Go Walker Bitdeli Badge

Discuss

Message me on G+

Drivers Support

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

Changelog

  • 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;
  • v0.1.9 : Added postgres and mymysql supported; Added ` and ? supported on Raw SQL even if postgres; Added Cols, StoreEngine, Charset function, Added many column data type supported, please see Mapping Rules.
  • v0.1.8 : Added union index and union unique supported, please see Mapping Rules.
  • v0.1.7 : Added IConnectPool interface and NoneConnectPool, SysConnectPool, SimpleConnectPool the three implements. You can choose one of them and the default is SysConnectPool. You can customrize your own connection pool. struct Engine added Close method, It should be invoked before system exit.
  • v0.1.6 : Added conversion interface support; added struct derive support; added single mapping support
  • v0.1.5 : Added multi threads support; added Sql() function for struct query; Get function changed return inteface; MakeSession and Create are instead with NewSession and NewEngine.
  • v0.1.4 : Added simple cascade load support; added more data type supports.
  • v0.1.3 : Find function now supports both slice and map; Add Table function for multi tables and temperory tables support
  • v0.1.2 : Insert function now supports both struct and slice pointer parameters, batch inserting and auto transaction
  • v0.1.1 : Add Id, In functions and improved README
  • v0.1.0 : Inital release.

Features

  • Struct<->Table Mapping Supports, both name mapping and filed tags mapping

  • Database Transaction Support

  • Both ORM and SQL Operation Support

  • Simply usage

  • Support Id, In, Where, Limit, Join, Having, Sql functions and sturct as query conditions

  • Support simple cascade load just like Hibernate for Java

  • Code generator support, See Xorm Tool README

Installing xorm

go get github.com/lunny/xorm

Documents

Quick Start

GoDoc

GoWalker

Cases

FAQ

1.How the xorm tag use both with json?

Use space.

type User struct {
    Name string `json:"name" xorm:"name"`
}

LICENSE

BSD License http://creativecommons.org/licenses/BSD/