Fix golint 'comment on exported (method|type) ...' warnings
This commit is contained in:
parent
8872adf7ee
commit
9a143fe45f
|
@ -92,7 +92,7 @@ func (m *LRUCacher) GC() {
|
|||
}
|
||||
}
|
||||
|
||||
// Get all bean's ids according to sql and parameter from cache
|
||||
// GetIds returns all bean's ids according to sql and parameter from cache
|
||||
func (m *LRUCacher) GetIds(tableName, sql string) interface{} {
|
||||
m.mutex.Lock()
|
||||
defer m.mutex.Unlock()
|
||||
|
@ -121,7 +121,7 @@ func (m *LRUCacher) GetIds(tableName, sql string) interface{} {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Get bean according tableName and id from cache
|
||||
// GetBean returns bean according tableName and id from cache
|
||||
func (m *LRUCacher) GetBean(tableName string, id string) interface{} {
|
||||
m.mutex.Lock()
|
||||
defer m.mutex.Unlock()
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
var _ core.CacheStore = NewMemoryStore()
|
||||
|
||||
// memory store
|
||||
// MemoryStore represents in-memory store
|
||||
type MemoryStore struct {
|
||||
store map[interface{}]interface{}
|
||||
mutex sync.RWMutex
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
|
||||
package xorm
|
||||
|
||||
// Executed before an object is initially persisted to the database
|
||||
// BeforeInsertProcessor executed before an object is initially persisted to the database
|
||||
type BeforeInsertProcessor interface {
|
||||
BeforeInsert()
|
||||
}
|
||||
|
||||
// Executed before an object is updated
|
||||
// BeforeUpdateProcessor executed before an object is updated
|
||||
type BeforeUpdateProcessor interface {
|
||||
BeforeUpdate()
|
||||
}
|
||||
|
||||
// Executed before an object is deleted
|
||||
// BeforeDeleteProcessor executed before an object is deleted
|
||||
type BeforeDeleteProcessor interface {
|
||||
BeforeDelete()
|
||||
}
|
||||
|
@ -34,17 +34,17 @@ type AfterSetProcessor interface {
|
|||
//}
|
||||
// --
|
||||
|
||||
// Executed after an object is persisted to the database
|
||||
// AfterInsertProcessor executed after an object is persisted to the database
|
||||
type AfterInsertProcessor interface {
|
||||
AfterInsert()
|
||||
}
|
||||
|
||||
// Executed after an object has been updated
|
||||
// AfterUpdateProcessor executed after an object has been updated
|
||||
type AfterUpdateProcessor interface {
|
||||
AfterUpdate()
|
||||
}
|
||||
|
||||
// Executed after an object has been deleted
|
||||
// AfterDeleteProcessor executed after an object has been deleted
|
||||
type AfterDeleteProcessor interface {
|
||||
AfterDelete()
|
||||
}
|
||||
|
|
|
@ -371,7 +371,7 @@ func (session *Session) DB() *core.DB {
|
|||
return session.db
|
||||
}
|
||||
|
||||
// Cond return session's conditions
|
||||
// Conds returns session query conditions
|
||||
func (session *Session) Conds() builder.Cond {
|
||||
return session.Statement.cond
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ func (statement *Statement) Alias(alias string) *Statement {
|
|||
return statement
|
||||
}
|
||||
|
||||
// Sql add the raw sql statement
|
||||
// SQL adds raw sql statement
|
||||
func (statement *Statement) SQL(query interface{}, args ...interface{}) *Statement {
|
||||
switch query.(type) {
|
||||
case (*builder.Builder):
|
||||
|
@ -795,14 +795,14 @@ func (statement *Statement) col2NewColsWithQuote(columns ...string) []string {
|
|||
return newColumns
|
||||
}
|
||||
|
||||
// Generate "Distince col1, col2 " statment
|
||||
// Distinct generates "DISTINCT col1, col2 " statement
|
||||
func (statement *Statement) Distinct(columns ...string) *Statement {
|
||||
statement.IsDistinct = true
|
||||
statement.Cols(columns...)
|
||||
return statement
|
||||
}
|
||||
|
||||
// Generate "SELECT ... FOR UPDATE" statment
|
||||
// ForUpdate generates "SELECT ... FOR UPDATE" statement
|
||||
func (statement *Statement) ForUpdate() *Statement {
|
||||
statement.IsForUpdate = true
|
||||
return statement
|
||||
|
|
Loading…
Reference in New Issue