diff --git a/README.md b/README.md index de4ba2f8..05a15cef 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Xorm is a simple and powerful ORM for Go. * Query Cache speed up -* Database Reverse support, See [Xorm Tool README](https://github.com/go-xorm/cmd/blob/master/README.md) +* Database Reverse support via [xorm.io/reverse](https://xorm.io/reverse) * Simple cascade loading support @@ -40,19 +40,21 @@ Xorm is a simple and powerful ORM for Go. Drivers for Go's sql package which currently support database/sql includes: -* Mysql: [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) +* [Mysql5.*](https://github.com/mysql/mysql-server/tree/5.7) / [Mysql8.*](https://github.com/mysql/mysql-server) / [Mariadb](https://github.com/MariaDB/server) / [Tidb](https://github.com/pingcap/tidb) + - [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) + - [github.com/ziutek/mymysql/godrv](https://github.com/ziutek/mymysql/godrv) -* MyMysql: [github.com/ziutek/mymysql/godrv](https://github.com/ziutek/mymysql/tree/master/godrv) +* [Postgres](https://github.com/postgres/postgres) / [Cockroach](https://github.com/cockroachdb/cockroach) + - [github.com/lib/pq](https://github.com/lib/pq) -* Postgres: [github.com/lib/pq](https://github.com/lib/pq) +* [SQLite](https://sqlite.org) + - [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) -* Tidb: [github.com/pingcap/tidb](https://github.com/pingcap/tidb) +* MsSql + - [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) -* SQLite: [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) - -* MsSql: [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) - -* Oracle: [github.com/mattn/go-oci8](https://github.com/mattn/go-oci8) (experiment) +* Oracle + - [github.com/mattn/go-oci8](https://github.com/mattn/go-oci8) (experiment) ## Installation diff --git a/README_CN.md b/README_CN.md index 5aae4fcb..d9ee6d8d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -2,15 +2,15 @@ [English](https://gitea.com/xorm/xorm/src/branch/master/README.md) -xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作非常简便。 +xorm 是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作非常简便。 -[![Build Status](https://drone.gitea.com/api/badges/xorm/builder/status.svg)](https://drone.gitea.com/xorm/builder) [![](http://gocover.io/_badge/xorm.io/xorm)](https://gocover.io/xorm.io/xorm) +[![Build Status](https://drone.gitea.com/api/badges/xorm/xorm/status.svg)](https://drone.gitea.com/xorm/xorm) [![](http://gocover.io/_badge/xorm.io/xorm)](https://gocover.io/xorm.io/xorm) [![](https://goreportcard.com/badge/xorm.io/xorm)](https://goreportcard.com/report/xorm.io/xorm) [![Join the chat at https://img.shields.io/discord/323460943201959939.svg](https://img.shields.io/discord/323460943201959939.svg)](https://discord.gg/HuR2CF3) ## 特性 -* 支持Struct和数据库表之间的灵活映射,并支持自动同步 +* 支持 Struct 和数据库表之间的灵活映射,并支持自动同步 * 事务支持 @@ -18,7 +18,7 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作 * 使用连写来简化调用 -* 支持使用Id, In, Where, Limit, Join, Having, Table, Sql, Cols等函数和结构体等方式作为条件 +* 支持使用ID, In, Where, Limit, Join, Having, Table, SQL, Cols等函数和结构体等方式作为条件 * 支持级联加载Struct @@ -26,11 +26,11 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作 * 支持缓存 -* 支持根据数据库自动生成xorm的结构体 +* 通过 [xorm.io/reverse](https://xorm.io/reverse) 支持根据数据库自动生成 xorm 结构体 * 支持记录版本(即乐观锁) -* 内置SQL Builder支持 +* 通过 [xorm.io/builder](https://xorm.io/builder) 内置 SQL Builder 支持 * 上下文缓存支持 @@ -38,21 +38,21 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作 目前支持的Go数据库驱动和对应的数据库如下: -* Mysql: [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) +* [Mysql5.*](https://github.com/mysql/mysql-server/tree/5.7) / [Mysql8.*](https://github.com/mysql/mysql-server) / [Mariadb](https://github.com/MariaDB/server) / [Tidb](https://github.com/pingcap/tidb) + - [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) + - [github.com/ziutek/mymysql/godrv](https://github.com/ziutek/mymysql/godrv) -* MyMysql: [github.com/ziutek/mymysql/godrv](https://github.com/ziutek/mymysql/godrv) +* [Postgres](https://github.com/postgres/postgres) / [Cockroach](https://github.com/cockroachdb/cockroach) + - [github.com/lib/pq](https://github.com/lib/pq) -* Postgres: [github.com/lib/pq](https://github.com/lib/pq) +* [SQLite](https://sqlite.org) + - [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) -* Tidb: [github.com/pingcap/tidb](https://github.com/pingcap/tidb) +* MsSql + - [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) -* SQLite: [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) - -* MsSql: [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) - -* MsSql: [github.com/lunny/godbc](https://github.com/lunny/godbc) - -* Oracle: [github.com/mattn/go-oci8](https://github.com/mattn/go-oci8) (试验性支持) +* Oracle + - [github.com/mattn/go-oci8](https://github.com/mattn/go-oci8) (试验性支持) ## 安装 diff --git a/engine.go b/engine.go index d94591e1..6dd4df3e 100644 --- a/engine.go +++ b/engine.go @@ -367,8 +367,8 @@ func (engine *Engine) dumpTables(tables []*schemas.Table, w io.Writer, tp ...sch distDBName = string(tp[0]) } - _, err := io.WriteString(w, fmt.Sprintf("/*Generated by xorm v%s %s, from %s to %s*/\n\n", - Version, time.Now().In(engine.TZLocation).Format("2006-01-02 15:04:05"), engine.dialect.URI().DBType, strings.ToUpper(distDBName))) + _, err := io.WriteString(w, fmt.Sprintf("/*Generated by xorm %s, from %s to %s*/\n\n", + time.Now().In(engine.TZLocation).Format("2006-01-02 15:04:05"), engine.dialect.URI().DBType, strings.ToUpper(distDBName))) if err != nil { return err } diff --git a/xorm.go b/xorm.go index 3618b718..2025522f 100644 --- a/xorm.go +++ b/xorm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.8 +// +build go1.11 package xorm @@ -20,11 +20,6 @@ import ( "xorm.io/xorm/tags" ) -const ( - // Version show the xorm's version - Version string = "0.8.0.1015" -) - func close(engine *Engine) { engine.Close() }