Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,sqlite,mssql,oracle,cockroach https://xorm.io
Go to file
2013-11-06 15:36:38 +08:00
docs improved QuickStart.md 2013-10-31 23:58:14 +08:00
examples improved sync indexes, now check columns;xorm tool bug fiexed 2013-10-28 11:16:22 +08:00
xorm improved sync indexes, now check columns;xorm tool bug fiexed 2013-10-28 11:16:22 +08:00
.gitignore fix mysql test and sqlite test 2013-05-06 16:01:17 +08:00
base_test.go add lib/pq support; bool on struct will not be as condition; 2013-11-06 15:36:38 +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 add lib/pq support; bool on struct will not be as condition; 2013-11-06 15:36:38 +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
iterator.go added Iterate method; added Omit method 2013-10-17 12:50:46 +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 improved sync indexes, now check columns;xorm tool bug fiexed 2013-10-28 11:16:22 +08:00
pool.go added type and sequence for xorm tool;added max connect for pool(go1.2+) 2013-10-27 09:10:20 +08:00
postgres_test.go add lib/pq support; bool on struct will not be as condition; 2013-11-06 15:36:38 +08:00
postgres.go improved sync indexes, now check columns;xorm tool bug fiexed 2013-10-28 11:16:22 +08:00
README_CN.md fixed name error on readme 2013-10-18 20:41:30 +08:00
README.md add lib/pq support; bool on struct will not be as condition; 2013-11-06 15:36:38 +08:00
session.go add lib/pq support; bool on struct will not be as condition; 2013-11-06 15:36:38 +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 type and sequence for xorm tool;added max connect for pool(go1.2+) 2013-10-27 09:10:20 +08:00
statement.go add lib/pq support; bool on struct will not be as condition; 2013-11-06 15:36:38 +08:00
table.go add lib/pq support; bool on struct will not be as condition; 2013-11-06 15:36:38 +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

Please visit xorm on Google Groups

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 tag mapping

  • Database Transaction Support

  • Both ORM and SQL Operation Support

  • Simply chainable usage

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

  • Cache Support

  • Reverse Tool Support

  • Simple cascade load support

  • Database Reverse Tool 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/