mirror of https://github.com/go-gorm/gorm.git
Update README
This commit is contained in:
parent
03f7bbfe74
commit
1ddc8e3984
50
README.md
50
README.md
|
@ -1,27 +1,35 @@
|
||||||
# GORM
|
# GORM
|
||||||
|
|
||||||
Yet Another ORM library for Go, hope sucks less. (created for internal usage, API is breakable)
|
Yet Another ORM library for Go, aims for developer friendly
|
||||||
|
|
||||||
# TODO
|
## TODO
|
||||||
Where("id =/>/</<> ?", string or int64).First(&user) (error)
|
* Perimary key
|
||||||
Where("id in (?)", map[]interface{}).First(&user) (error)
|
* Create table
|
||||||
Where("id in (?)", map[]interface{}).Find(&users) (error)
|
* Save and fill the record
|
||||||
Where(map[string]string{"id": "12", "name": "jinzhu"}).Find(&users) (error)
|
* Update
|
||||||
Order("").Limit(11).Or("").Count().Select("").Not("").Offset(11)
|
* Delete
|
||||||
|
* Complex where query (= / > / < / <> / in)
|
||||||
|
* Order
|
||||||
|
* Limit
|
||||||
|
* Select
|
||||||
|
* Offset
|
||||||
|
* Or query
|
||||||
|
* Not query
|
||||||
|
* Even more complex where query (with map or struct)
|
||||||
|
* ORM.Errors
|
||||||
|
* Better First method (First(&user, primary_key))
|
||||||
|
* Soft Delete
|
||||||
|
* After/Before Save/Update/Create/Delete
|
||||||
|
* FindOrInitialize / FindOrCreate
|
||||||
|
* Exec run SQL directly
|
||||||
|
* SQL Log
|
||||||
|
* Auto Migration
|
||||||
|
* Index, Unique, Valiations
|
||||||
|
|
||||||
First(&user, primary_key) (error)
|
# Author
|
||||||
|
|
||||||
Save(&user)
|
**Jinzhu**
|
||||||
Save(&users)
|
|
||||||
Delete(&user)
|
|
||||||
Delete(&users)
|
|
||||||
|
|
||||||
Before/After Save/Update/Create/Delete
|
* <http://github.com/jinzhu>
|
||||||
Where("id in ?", map[]interface{}).FindOrInitialize(&users) (error)
|
* <wosmvp@gmail.com>
|
||||||
Where("id in ?", map[]interface{}).FindOrCreate(&users) (error)
|
* <http://twitter.com/zhangjinzhu>
|
||||||
|
|
||||||
Sql("ssssss", &users)
|
|
||||||
|
|
||||||
SQL log
|
|
||||||
Auto Migration
|
|
||||||
Index, Unique
|
|
||||||
|
|
Loading…
Reference in New Issue