Documentation ¶
Index ¶
- type GormHelper
- func (db *GormHelper) Begin() *GormHelper
- func (db *GormHelper) Commit() *GormHelper
- func (db *GormHelper) CountHelper(model interface{}, where interface{}) int32
- func (db *GormHelper) DeleteHelper(model interface{}, object interface{}) database.DbStatus
- func (db *GormHelper) ExistHelper(model interface{}, where interface{}) bool
- func (db *GormHelper) InsertHelper(model interface{}, object interface{}) database.DbStatus
- func (db *GormHelper) PageHelper(limit int32, page int32) *GormHelper
- func (db *GormHelper) QueryFirstHelper(model interface{}, where interface{}) interface{}
- func (db *GormHelper) QueryMultiHelper(model interface{}, limit int32, page int32, where interface{}, order string, ...) int32
- func (db *GormHelper) Rollback() *GormHelper
- func (db *GormHelper) RollbackUnlessCommitted() *GormHelper
- func (db *GormHelper) UpdateHelper(model interface{}, object interface{}) database.DbStatus
- type Neo4jHelper
- func (db *Neo4jHelper) GetBoolean(data interface{}) bool
- func (db *Neo4jHelper) GetByteArray(data interface{}) []byte
- func (db *Neo4jHelper) GetFloat(data interface{}) float64
- func (db *Neo4jHelper) GetInteger(data interface{}) int64
- func (db *Neo4jHelper) GetList(data interface{}) []interface{}
- func (db *Neo4jHelper) GetMap(data interface{}) map[string]interface{}
- func (db *Neo4jHelper) GetNode(data interface{}) neo4j.Node
- func (db *Neo4jHelper) GetPath(data interface{}) neo4j.Path
- func (db *Neo4jHelper) GetRecordFromResult(result neo4j.Result) ([]neo4j.Record, error)
- func (db *Neo4jHelper) GetRel(data interface{}) neo4j.Relationship
- func (db *Neo4jHelper) GetString(data interface{}) string
- func (db *Neo4jHelper) RunCypher(cypher string, params map[string]interface{}, ...) ([]neo4j.Record, error)
- func (db *Neo4jHelper) RunCypherTx(cypher string, params map[string]interface{}, ...) (neo4j.Transaction, []neo4j.Record, error)
- type RedisHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormHelper ¶
func NewGormHelper ¶
func NewGormHelper(db *gorm.DB) *GormHelper
func (*GormHelper) Begin ¶
func (db *GormHelper) Begin() *GormHelper
func (*GormHelper) Commit ¶
func (db *GormHelper) Commit() *GormHelper
func (*GormHelper) CountHelper ¶
func (db *GormHelper) CountHelper(model interface{}, where interface{}) int32
func (*GormHelper) DeleteHelper ¶
func (db *GormHelper) DeleteHelper(model interface{}, object interface{}) database.DbStatus
func (*GormHelper) ExistHelper ¶
func (db *GormHelper) ExistHelper(model interface{}, where interface{}) bool
func (*GormHelper) InsertHelper ¶
func (db *GormHelper) InsertHelper(model interface{}, object interface{}) database.DbStatus
func (*GormHelper) PageHelper ¶
func (db *GormHelper) PageHelper(limit int32, page int32) *GormHelper
func (*GormHelper) QueryFirstHelper ¶
func (db *GormHelper) QueryFirstHelper(model interface{}, where interface{}) interface{}
func (*GormHelper) QueryMultiHelper ¶
func (db *GormHelper) QueryMultiHelper(model interface{}, limit int32, page int32, where interface{}, order string, out interface{}) int32
func (*GormHelper) Rollback ¶
func (db *GormHelper) Rollback() *GormHelper
func (*GormHelper) RollbackUnlessCommitted ¶
func (db *GormHelper) RollbackUnlessCommitted() *GormHelper
func (*GormHelper) UpdateHelper ¶
func (db *GormHelper) UpdateHelper(model interface{}, object interface{}) database.DbStatus
type Neo4jHelper ¶
type Neo4jHelper struct { IsLog bool Logger database.INeo4JLogger neo4j.Session }
func NewNeo4jHelper ¶
func NewNeo4jHelper(isLog bool, logger database.INeo4JLogger, session neo4j.Session) *Neo4jHelper
func (*Neo4jHelper) GetBoolean ¶
func (db *Neo4jHelper) GetBoolean(data interface{}) bool
func (*Neo4jHelper) GetByteArray ¶
func (db *Neo4jHelper) GetByteArray(data interface{}) []byte
func (*Neo4jHelper) GetFloat ¶
func (db *Neo4jHelper) GetFloat(data interface{}) float64
func (*Neo4jHelper) GetInteger ¶
func (db *Neo4jHelper) GetInteger(data interface{}) int64
func (*Neo4jHelper) GetList ¶
func (db *Neo4jHelper) GetList(data interface{}) []interface{}
func (*Neo4jHelper) GetMap ¶
func (db *Neo4jHelper) GetMap(data interface{}) map[string]interface{}
func (*Neo4jHelper) GetNode ¶
func (db *Neo4jHelper) GetNode(data interface{}) neo4j.Node
func (*Neo4jHelper) GetPath ¶
func (db *Neo4jHelper) GetPath(data interface{}) neo4j.Path
func (*Neo4jHelper) GetRecordFromResult ¶
Check summary error and get records from result
func (*Neo4jHelper) GetRel ¶
func (db *Neo4jHelper) GetRel(data interface{}) neo4j.Relationship
func (*Neo4jHelper) GetString ¶
func (db *Neo4jHelper) GetString(data interface{}) string
func (*Neo4jHelper) RunCypher ¶
func (db *Neo4jHelper) RunCypher(cypher string, params map[string]interface{}, configures ...func(*neo4j.TransactionConfig)) ([]neo4j.Record, error)
Run cypher in session
func (*Neo4jHelper) RunCypherTx ¶
func (db *Neo4jHelper) RunCypherTx(cypher string, params map[string]interface{}, configures ...func(*neo4j.TransactionConfig)) (neo4j.Transaction, []neo4j.Record, error)
Run cypher in transaction manually, pay attention to [defer tx.Close]
type RedisHelper ¶
func NewRedisHelper ¶
func NewRedisHelper(conn redis.Conn) *RedisHelper
func (*RedisHelper) DeleteAll ¶
func (db *RedisHelper) DeleteAll(pattern string) bool
Click to show internal directories.
Click to hide internal directories.