add SetLockRead

This commit is contained in:
sunsc 2015-06-30 17:57:36 +08:00
parent f549b458b8
commit 026c2f53f5
1 changed files with 10 additions and 0 deletions

View File

@ -97,6 +97,16 @@ func (session *Session) Sql(querystring string, args ...interface{}) *Session {
return session
}
//set read lock
func (session *Session) SetLockRead(lr ...bool) *Session {
if 0 == len(lr) {
session.LockRead = true
} else {
session.LockRead = lr[0]
}
return session
}
// Method Where provides custom query condition.
func (session *Session) Where(querystring string, args ...interface{}) *Session {
session.Statement.Where(querystring, args...)