renamed import path
This commit is contained in:
parent
128db9c792
commit
1213bc14b5
|
@ -1,2 +1,2 @@
|
|||
[target]
|
||||
path = github.com/lunny/xorm
|
||||
path = github.com/go-xorm/xorm
|
|
@ -21,11 +21,11 @@ We appreciate any bug reports, but especially ones with self-contained
|
|||
further) test cases. It's especially helpful if you can submit a pull
|
||||
request with just the failing test case (you'll probably want to
|
||||
pattern it after the tests in
|
||||
[base_test.go](https://github.com/lunny/xorm/blob/master/base_test.go) AND
|
||||
[benchmark_base_test.go](https://github.com/lunny/xorm/blob/master/benchmark_base_test.go).
|
||||
[base_test.go](https://github.com/go-xorm/xorm/blob/master/base_test.go) AND
|
||||
[benchmark_base_test.go](https://github.com/go-xorm/xorm/blob/master/benchmark_base_test.go).
|
||||
|
||||
If you implements a new database interface, you maybe need to add a <databasename>_test.go file.
|
||||
For example, [mysql_test.go](https://github.com/lunny/xorm/blob/master/mysql_test.go)
|
||||
For example, [mysql_test.go](https://github.com/go-xorm/xorm/blob/master/mysql_test.go)
|
||||
|
||||
### New functionality
|
||||
|
||||
|
|
20
README.md
20
README.md
|
@ -1,8 +1,8 @@
|
|||
[中文](https://github.com/lunny/xorm/blob/master/README_CN.md)
|
||||
[中文](https://github.com/go-xorm/xorm/blob/master/README_CN.md)
|
||||
|
||||
Xorm is a simple and powerful ORM for Go.
|
||||
|
||||
[](https://drone.io/github.com/lunny/xorm/latest) [](http://gowalker.org/github.com/lunny/xorm) [](https://bitdeli.com/free "Bitdeli Badge")
|
||||
[](https://drone.io/github.com/go-xorm/xorm/latest) [](http://gowalker.org/github.com/go-xorm/xorm) [](https://bitdeli.com/free "Bitdeli Badge")
|
||||
|
||||
# Features
|
||||
|
||||
|
@ -18,7 +18,7 @@ Xorm is a simple and powerful ORM for Go.
|
|||
|
||||
* Query Cache speed up
|
||||
|
||||
* Database Reverse support, See [Xorm Tool README](https://github.com/lunny/xorm/blob/master/xorm/README.md)
|
||||
* Database Reverse support, See [Xorm Tool README](https://github.com/go-xorm/xorm/blob/master/xorm/README.md)
|
||||
|
||||
* Simple cascade loading support
|
||||
|
||||
|
@ -54,25 +54,25 @@ Drivers for Go's sql package which currently support database/sql includes:
|
|||
* Allowed int/int32/int64/uint/uint32/uint64/string as Primary Key type
|
||||
* Performance improvement for Get()/Find()/Iterate()
|
||||
|
||||
[More changelogs ...](https://github.com/lunny/xorm/blob/master/docs/Changelog.md)
|
||||
[More changelogs ...](https://github.com/go-xorm/xorm/blob/master/docs/Changelog.md)
|
||||
|
||||
# Installation
|
||||
|
||||
If you have [gopm](https://github.com/gpmgo/gopm) installed,
|
||||
|
||||
gopm get github.com/lunny/xorm
|
||||
gopm get github.com/go-xorm/xorm
|
||||
|
||||
Or
|
||||
|
||||
go get github.com/lunny/xorm
|
||||
go get github.com/go-xorm/xorm
|
||||
|
||||
# Documents
|
||||
|
||||
* [GoDoc](http://godoc.org/github.com/lunny/xorm)
|
||||
* [GoDoc](http://godoc.org/github.com/go-xorm/xorm)
|
||||
|
||||
* [GoWalker](http://gowalker.org/github.com/lunny/xorm)
|
||||
* [GoWalker](http://gowalker.org/github.com/go-xorm/xorm)
|
||||
|
||||
* [Quick Start](https://github.com/lunny/xorm/blob/master/docs/QuickStartEn.md)
|
||||
* [Quick Start](https://github.com/go-xorm/xorm/blob/master/docs/QuickStartEn.md)
|
||||
|
||||
# Cases
|
||||
|
||||
|
@ -96,7 +96,7 @@ Please visit [Xorm on Google Groups](https://groups.google.com/forum/#!forum/xor
|
|||
|
||||
# Contributors
|
||||
|
||||
If you want to pull request, please see [CONTRIBUTING](https://github.com/lunny/xorm/blob/master/CONTRIBUTING.md)
|
||||
If you want to pull request, please see [CONTRIBUTING](https://github.com/go-xorm/xorm/blob/master/CONTRIBUTING.md)
|
||||
|
||||
* [Lunny](https://github.com/lunny)
|
||||
* [Nashtsai](https://github.com/nashtsai)
|
||||
|
|
18
README_CN.md
18
README_CN.md
|
@ -1,10 +1,10 @@
|
|||
# xorm
|
||||
|
||||
[English](https://github.com/lunny/xorm/blob/master/README.md)
|
||||
[English](https://github.com/go-xorm/xorm/blob/master/README.md)
|
||||
|
||||
xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作非常简便。
|
||||
|
||||
[](https://drone.io/github.com/lunny/xorm/latest) [](http://gowalker.org/github.com/lunny/xorm)
|
||||
[](https://drone.io/github.com/go-xorm/xorm/latest) [](http://gowalker.org/github.com/go-xorm/xorm)
|
||||
|
||||
## 特性
|
||||
|
||||
|
@ -56,25 +56,25 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作
|
|||
* 查询函数 Get()/Find()/Iterate() 在性能上的改进
|
||||
|
||||
|
||||
[更多更新日志...](https://github.com/lunny/xorm/blob/master/docs/ChangelogCN.md)
|
||||
[更多更新日志...](https://github.com/go-xorm/xorm/blob/master/docs/ChangelogCN.md)
|
||||
|
||||
## 安装
|
||||
|
||||
推荐使用 [gopm](https://github.com/gpmgo/gopm) 进行安装:
|
||||
|
||||
gopm get github.com/lunny/xorm
|
||||
gopm get github.com/go-xorm/xorm
|
||||
|
||||
或者您也可以使用go工具进行安装:
|
||||
|
||||
go get github.com/lunny/xorm
|
||||
go get github.com/go-xorm/xorm
|
||||
|
||||
## 文档
|
||||
|
||||
* [快速开始](https://github.com/lunny/xorm/blob/master/docs/QuickStart.md)
|
||||
* [快速开始](https://github.com/go-xorm/xorm/blob/master/docs/QuickStart.md)
|
||||
|
||||
* [GoWalker代码文档](http://gowalker.org/github.com/lunny/xorm)
|
||||
* [GoWalker代码文档](http://gowalker.org/github.com/go-xorm/xorm)
|
||||
|
||||
* [Godoc代码文档](http://godoc.org/github.com/lunny/xorm)
|
||||
* [Godoc代码文档](http://godoc.org/github.com/go-xorm/xorm)
|
||||
|
||||
|
||||
## 案例
|
||||
|
@ -99,7 +99,7 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作
|
|||
|
||||
# 贡献者
|
||||
|
||||
如果您也想为Xorm贡献您的力量,请查看 [CONTRIBUTING](https://github.com/lunny/xorm/blob/master/CONTRIBUTING.md)
|
||||
如果您也想为Xorm贡献您的力量,请查看 [CONTRIBUTING](https://github.com/go-xorm/xorm/blob/master/CONTRIBUTING.md)
|
||||
|
||||
* [Lunny](https://github.com/lunny)
|
||||
* [Nashtsai](https://github.com/nashtsai)
|
||||
|
|
4
doc.go
4
doc.go
|
@ -9,7 +9,7 @@ Installation
|
|||
|
||||
Make sure you have installed Go 1.1+ and then:
|
||||
|
||||
go get github.com/lunny/xorm
|
||||
go get github.com/go-xorm/xorm
|
||||
|
||||
Create Engine
|
||||
|
||||
|
@ -137,6 +137,6 @@ The above 7 methods could use with condition methods.
|
|||
engine.Join("LEFT", "userdetail", "user.id=userdetail.id").Find()
|
||||
//SELECT * FROM user LEFT JOIN userdetail ON user.id=userdetail.id
|
||||
|
||||
More usage, please visit https://github.com/lunny/xorm/blob/master/docs/QuickStartEn.md
|
||||
More usage, please visit https://github.com/go-xorm/xorm/blob/master/docs/QuickStartEn.md
|
||||
*/
|
||||
package xorm
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
* **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](https://github.com/lunny/xorm/blob/master/xorm/README.md); some bug fixed.
|
||||
* **v0.2.1** : Added database reverse tool, now support generate go & c++ codes, see [Xorm Tool README](https://github.com/go-xorm/xorm/blob/master/xorm/README.md); 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](#mapping).
|
||||
* **v0.1.8** : Added union index and union unique supported, please see [Mapping Rules](#mapping).
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
|
||||
* **v0.2.3** : 改善了文档;提供了乐观锁支持;添加了带时区时间字段支持;Mapper现在分成表名Mapper和字段名Mapper,同时实现了表或字段的自定义前缀后缀;Insert方法的返回值含义从id, err更改为 affected, err,请大家注意;添加了UseBool 和 Distinct函数。
|
||||
* **v0.2.2** : Postgres驱动新增了对lib/pq的支持;新增了逐条遍历方法Iterate;新增了SetMaxConns(go1.2+)支持,修复了bug若干;
|
||||
* **v0.2.1** : 新增数据库反转工具,当前支持go和c++代码的生成,详见 [Xorm Tool README](https://github.com/lunny/xorm/blob/master/xorm/README.md); 修复了一些bug.
|
||||
* **v0.2.0** : 新增 [缓存](https://github.com/lunny/xorm/blob/master/docs/QuickStart.md#120)支持,查询速度提升3-5倍; 新增数据库表和Struct同名的映射方式; 新增Sync同步表结构;
|
||||
* **v0.1.9** : 新增 postgres 和 mymysql 驱动支持; 在Postgres中支持原始SQL语句中使用 ` 和 ? 符号; 新增Cols, StoreEngine, Charset 函数;SQL语句打印支持io.Writer接口,默认打印到控制台;新增更多的字段类型支持,详见 [映射规则](https://github.com/lunny/xorm/blob/master/docs/QuickStart.md#21);删除废弃的MakeSession和Create函数。
|
||||
* **v0.1.8** : 新增联合index,联合unique支持,请查看 [映射规则](https://github.com/lunny/xorm/blob/master/docs/QuickStart.md#21)。
|
||||
* **v0.2.1** : 新增数据库反转工具,当前支持go和c++代码的生成,详见 [Xorm Tool README](https://github.com/go-xorm/xorm/blob/master/xorm/README.md); 修复了一些bug.
|
||||
* **v0.2.0** : 新增 [缓存](https://github.com/go-xorm/xorm/blob/master/docs/QuickStart.md#120)支持,查询速度提升3-5倍; 新增数据库表和Struct同名的映射方式; 新增Sync同步表结构;
|
||||
* **v0.1.9** : 新增 postgres 和 mymysql 驱动支持; 在Postgres中支持原始SQL语句中使用 ` 和 ? 符号; 新增Cols, StoreEngine, Charset 函数;SQL语句打印支持io.Writer接口,默认打印到控制台;新增更多的字段类型支持,详见 [映射规则](https://github.com/go-xorm/xorm/blob/master/docs/QuickStart.md#21);删除废弃的MakeSession和Create函数。
|
||||
* **v0.1.8** : 新增联合index,联合unique支持,请查看 [映射规则](https://github.com/go-xorm/xorm/blob/master/docs/QuickStart.md#21)。
|
||||
* **v0.1.7** : 新增IConnectPool接口以及NoneConnectPool, SysConnectPool, SimpleConnectPool三种实现,可以选择不使用连接池,使用系统连接池和使用自带连接池三种实现,默认为SysConnectPool,即系统自带的连接池。同时支持自定义连接池。Engine新增Close方法,在系统退出时应调用此方法。
|
||||
* **v0.1.6** : 新增Conversion,支持自定义类型到数据库类型的转换;新增查询结构体自动检测匿名成员支持;新增单向映射支持;
|
||||
* **v0.1.5** : 新增对多线程的支持;新增Sql()函数;支持任意sql语句的struct查询;Get函数返回值变动;MakeSession和Create函数被NewSession和NewEngine函数替代;
|
||||
|
|
|
@ -45,7 +45,7 @@ xorm 快速入门
|
|||
```Go
|
||||
import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
)
|
||||
engine, err := xorm.NewEngine("mysql", "root:123@/test?charset=utf8")
|
||||
defer engine.Close()
|
||||
|
@ -56,7 +56,7 @@ or
|
|||
```Go
|
||||
import (
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
)
|
||||
engine, err = xorm.NewEngine("sqlite3", "./test.db")
|
||||
defer engine.Close()
|
||||
|
@ -169,7 +169,7 @@ type User struct {
|
|||
}
|
||||
```
|
||||
|
||||
对于不同的数据库系统,数据类型其实是有些差异的。因此xorm中对数据类型有自己的定义,基本的原则是尽量兼容各种数据库的字段类型,具体的字段对应关系可以查看[字段类型对应表](https://github.com/lunny/xorm/blob/master/docs/COLUMNTYPE.md)。对于使用者,一般只要使用自己熟悉的数据库字段定义即可。
|
||||
对于不同的数据库系统,数据类型其实是有些差异的。因此xorm中对数据类型有自己的定义,基本的原则是尽量兼容各种数据库的字段类型,具体的字段对应关系可以查看[字段类型对应表](https://github.com/go-xorm/xorm/blob/master/docs/COLUMNTYPE.md)。对于使用者,一般只要使用自己熟悉的数据库字段定义即可。
|
||||
|
||||
具体的映射规则如下,另Tag中的关键字均不区分大小写,字段名区分大小写:
|
||||
|
||||
|
@ -181,7 +181,7 @@ type User struct {
|
|||
<td>pk</td><td>是否是Primary Key,如果在一个struct中有多个字段都使用了此标记,则这多个字段构成了复合主键,单主键当前支持int32,int,int64,uint32,uint,uint64,string这7种Go的数据类型,复合主键支持这7种Go的数据类型的组合。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>当前支持30多种字段类型,详情参见 [字段类型](https://github.com/lunny/xorm/blob/master/docs/COLUMNTYPE.md)</td><td>字段类型</td>
|
||||
<td>当前支持30多种字段类型,详情参见 [字段类型](https://github.com/go-xorm/xorm/blob/master/docs/COLUMNTYPE.md)</td><td>字段类型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>autoincr</td><td>是否是自增</td>
|
||||
|
@ -227,7 +227,7 @@ type User struct {
|
|||
|
||||
- 2.string类型默认映射为varchar(255),如果需要不同的定义,可以在tag中自定义
|
||||
|
||||
- 3.支持`type MyString string`等自定义的field,支持Slice, Map等field成员,这些成员默认存储为Text类型,并且默认将使用Json格式来序列化和反序列化。也支持数据库字段类型为Blob类型,如果是Blob类型,则先使用Json格式序列化再转成[]byte格式。当然[]byte或者[]uint8默认为Blob类型并且都以二进制方式存储。具体参见 [go类型<->数据库类型对应表](https://github.com/lunny/xorm/blob/master/docs/AutoMap.md)
|
||||
- 3.支持`type MyString string`等自定义的field,支持Slice, Map等field成员,这些成员默认存储为Text类型,并且默认将使用Json格式来序列化和反序列化。也支持数据库字段类型为Blob类型,如果是Blob类型,则先使用Json格式序列化再转成[]byte格式。当然[]byte或者[]uint8默认为Blob类型并且都以二进制方式存储。具体参见 [go类型<->数据库类型对应表](https://github.com/go-xorm/xorm/blob/master/docs/AutoMap.md)
|
||||
|
||||
- 4.实现了Conversion接口的类型或者结构体,将根据接口的转换方式在类型和数据库记录之间进行相互转换。
|
||||
```Go
|
||||
|
@ -242,7 +242,7 @@ type Conversion interface {
|
|||
|
||||
如果不使用tag来定义field对应的数据库字段类型,那么系统会自动给出一个默认的字段类型,对应表如下:
|
||||
|
||||
[go类型<->数据库类型对应表](https://github.com/lunny/xorm/blob/master/docs/AutoMap.md)
|
||||
[go类型<->数据库类型对应表](https://github.com/go-xorm/xorm/blob/master/docs/AutoMap.md)
|
||||
|
||||
<a name="30" id="30"></a>
|
||||
## 3.表结构操作
|
||||
|
@ -755,7 +755,7 @@ engine.ClearCache(new(User))
|
|||
|
||||
缓存的实现原理如下图所示:
|
||||
|
||||

|
||||

|
||||
|
||||
<a name="125" id="125"></a>
|
||||
## 12.事件
|
||||
|
@ -788,12 +788,12 @@ xorm支持两种方式的事件,一种是在Struct中的特定方法来作为
|
|||
xorm工具提供了xorm命令,能够帮助做很多事情。
|
||||
|
||||
### 13.1.反转命令
|
||||
参见 [xorm工具](https://github.com/lunny/xorm/tree/master/xorm)
|
||||
参见 [xorm工具](https://github.com/go-xorm/xorm/tree/master/xorm)
|
||||
|
||||
<a name="140" id="140"></a>
|
||||
## 14.Examples
|
||||
|
||||
请访问[https://github.com/lunny/xorm/tree/master/examples](https://github.com/lunny/xorm/tree/master/examples)
|
||||
请访问[https://github.com/go-xorm/xorm/tree/master/examples](https://github.com/go-xorm/xorm/tree/master/examples)
|
||||
|
||||
<a name="150" id="150"></a>
|
||||
## 15.案例
|
||||
|
|
|
@ -41,7 +41,7 @@ When using xorm, you can create multiple orm engines, an engine means a databse.
|
|||
```Go
|
||||
import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
)
|
||||
engine, err := xorm.NewEngine("mysql", "root:123@/test?charset=utf8")
|
||||
defer engine.Close()
|
||||
|
@ -52,7 +52,7 @@ or
|
|||
```Go
|
||||
import (
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
)
|
||||
engine, err = xorm.NewEngine("sqlite3", "./test.db")
|
||||
defer engine.Close()
|
||||
|
@ -150,7 +150,7 @@ type User struct {
|
|||
}
|
||||
```
|
||||
|
||||
对于不同的数据库系统,数据类型其实是有些差异的。因此xorm中对数据类型有自己的定义,基本的原则是尽量兼容各种数据库的字段类型,具体的字段对应关系可以查看[字段类型对应表](https://github.com/lunny/xorm/blob/master/docs/COLUMNTYPE.md)。
|
||||
对于不同的数据库系统,数据类型其实是有些差异的。因此xorm中对数据类型有自己的定义,基本的原则是尽量兼容各种数据库的字段类型,具体的字段对应关系可以查看[字段类型对应表](https://github.com/go-xorm/xorm/blob/master/docs/COLUMNTYPE.md)。
|
||||
|
||||
具体的映射规则如下,另Tag中的关键字均不区分大小写,字段名区分大小写:
|
||||
|
||||
|
@ -162,7 +162,7 @@ type User struct {
|
|||
<td>pk</td><td>是否是Primary Key,当前仅支持int64类型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>当前支持30多种字段类型,详情参见 [字段类型](https://github.com/lunny/xorm/blob/master/docs/COLUMNTYPE.md)</td><td>字段类型</td>
|
||||
<td>当前支持30多种字段类型,详情参见 [字段类型](https://github.com/go-xorm/xorm/blob/master/docs/COLUMNTYPE.md)</td><td>字段类型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>autoincr</td><td>是否是自增</td>
|
||||
|
@ -654,19 +654,19 @@ engine.ClearCache(new(User))
|
|||
|
||||
Cache implement theory below:
|
||||
|
||||

|
||||

|
||||
|
||||
<a name="130" id="130"></a>
|
||||
## 12.xorm tool
|
||||
xorm工具提供了xorm命令,能够帮助做很多事情。
|
||||
|
||||
### 12.1.Reverse command
|
||||
Please visit [xorm tool](https://github.com/lunny/xorm/tree/master/xorm)
|
||||
Please visit [xorm tool](https://github.com/go-xorm/xorm/tree/master/xorm)
|
||||
|
||||
<a name="140" id="140"></a>
|
||||
## 13.Examples
|
||||
|
||||
请访问[https://github.com/lunny/xorm/tree/master/examples](https://github.com/lunny/xorm/tree/master/examples)
|
||||
请访问[https://github.com/go-xorm/xorm/tree/master/examples](https://github.com/go-xorm/xorm/tree/master/examples)
|
||||
|
||||
<a name="150" id="150"></a>
|
||||
## 14.Cases
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/lunny/xorm/caches"
|
||||
"github.com/go-xorm/xorm"
|
||||
"github.com/go-xorm/xorm/caches"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"os"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"runtime"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"runtime"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
_ "github.com/bylevel/pq"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[deps]
|
||||
github.com/lunny/xorm=../
|
||||
github.com/go-xorm/xorm=../
|
|
@ -5,11 +5,11 @@ xorm tools is a set of tools for database operation.
|
|||
|
||||
## Install
|
||||
|
||||
`go get github.com/lunny/xorm/xorm`
|
||||
`go get github.com/go-xorm/xorm/xorm`
|
||||
|
||||
and you should install the depends below:
|
||||
|
||||
* github.com/lunny/xorm
|
||||
* github.com/go-xorm/xorm
|
||||
|
||||
* Mysql: [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/lunny/xorm/core"
|
||||
"github.com/go-xorm/core"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/lunny/xorm/core"
|
||||
"github.com/go-xorm/core"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/go-xorm/core"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"text/template"
|
||||
"github.com/lunny/xorm/core"
|
||||
)
|
||||
|
||||
type LangTmpl struct {
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
_ "github.com/bylevel/pq"
|
||||
"github.com/dvirsky/go-pylog/logging"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/lunny/xorm/core"
|
||||
"github.com/go-xorm/core"
|
||||
"github.com/go-xorm/xorm"
|
||||
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
_ "github.com/ziutek/mymysql/godrv"
|
||||
|
|
|
@ -2,7 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/lunny/xorm"
|
||||
"github.com/go-xorm/xorm"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue