Browse Source

补充readme

master
guzeng 3 years ago
parent
commit
1c6146621a
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      README.md

+ 4
- 1
README.md View File

@ -11,7 +11,7 @@ map,err := new(Query).Db(dbname).Table(tablename).Where("id=?").Where("name=?").
查询列表 查询列表
list,err := new(Query).Db(dbname).Table(tablename).Where("id=?").Where("name=?").Value(1).Value("test").Select() list,err := new(Query).Db(dbname).Table(tablename).Where("id=?").Where("name=?").Value(1).Value("test").Select()
条件或
条件""
list,err := new(Query).Db(dbname).Table(tablename).Where("id=?").Where("name=?").WhereOr("mobile=?").Value(1).Value("test").Value("22").Select() list,err := new(Query).Db(dbname).Table(tablename).Where("id=?").Where("name=?").WhereOr("mobile=?").Value(1).Value("test").Value("22").Select()
@ -26,4 +26,7 @@ ret,err := new(Query).Db(dbname).Table(tablename).Data("name=?").Data("depart=?"
插入 插入
ret,err := new(Query).Db(dbname).Table(tablename).Data("name=?").Data("depart=?").Value("xxx").Value("test").Create() ret,err := new(Query).Db(dbname).Table(tablename).Data("name=?").Data("depart=?").Value("xxx").Value("test").Create()
删除
ret,err := new(Query).Db(dbname).Table(tablename).Where("name=?").Where("depart=?").Value("xxx").Value("test").Delete()
``` ```

Loading…
Cancel
Save