add SetLockRead
This commit is contained in:
parent
f549b458b8
commit
026c2f53f5
10
session.go
10
session.go
|
@ -97,6 +97,16 @@ func (session *Session) Sql(querystring string, args ...interface{}) *Session {
|
||||||
return 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.
|
// Method Where provides custom query condition.
|
||||||
func (session *Session) Where(querystring string, args ...interface{}) *Session {
|
func (session *Session) Where(querystring string, args ...interface{}) *Session {
|
||||||
session.Statement.Where(querystring, args...)
|
session.Statement.Where(querystring, args...)
|
||||||
|
|
Loading…
Reference in New Issue