Add an example with time

This commit is contained in:
Eduardo Trujillo 2015-04-03 23:08:35 -04:00
parent a952601f21
commit 640700d391
1 changed files with 5 additions and 0 deletions

View File

@ -213,6 +213,11 @@ db.Where("name LIKE ?", "%jin%").Find(&users)
// AND
db.Where("name = ? and age >= ?", "jinzhu", "22").Find(&users)
// Time
db.Where("updated_at > ?", lastWeek).Find(&users)
db.Where("created_at BETWEEN ? AND ?", lastWeek, today).Find(&users)
```
### Query With Where (Struct & Map)