update latest xorm version to vendor (#2353)

This commit is contained in:
Lunny Xiao 2017-08-22 19:39:52 +08:00 committed by Lauris BH
parent 5c29b0a5fe
commit 2c6a0fdca8
44 changed files with 1748 additions and 1414 deletions

View file

@ -8,7 +8,7 @@ Package xorm is a simple and powerful ORM for Go.
Installation
Make sure you have installed Go 1.1+ and then:
Make sure you have installed Go 1.6+ and then:
go get github.com/go-xorm/xorm
@ -51,11 +51,15 @@ There are 8 major ORM methods and many helpful methods to use to operate databas
// INSERT INTO struct1 () values ()
// INSERT INTO struct2 () values (),(),()
2. Query one record from database
2. Query one record or one variable from database
has, err := engine.Get(&user)
// SELECT * FROM user LIMIT 1
var id int64
has, err := engine.Table("user").Where("name = ?", name).Get(&id)
// SELECT id FROM user WHERE name = ? LIMIT 1
3. Query multiple records from database
var sliceOfStructs []Struct
@ -99,6 +103,9 @@ another is Rows
counts, err := engine.Count(&user)
// SELECT count(*) AS total FROM user
counts, err := engine.SQL("select count(*) FROM user").Count()
// select count(*) FROM user
8. Sum records
sumFloat64, err := engine.Sum(&user, "id")