Documentation ¶
Overview ¶
Package conn @author: Violet-Eva @date : 2024/12/24 @notes :
Package conn @author: Violet-Eva @date : 2024/12/19 @notes :
Package conn @author: Violet-Eva @date : 2024/12/24 @notes :
Package conn @author: Violet-Eva @date : 2024/12/24 @notes :
Index ¶
- Constants
- func InitGormDB(dbType, dbName, user, passwd, host string, ...) (gormDB *gorm.DB, err error)
- type Address
- type HiveConn
- func (hc *HiveConn) ExecQuery(query string) ([]map[string]interface{}, error)
- func (hc *HiveConn) ExecQueryBatchSize(query string, batchSize int, ...) (err error)
- func (hc *HiveConn) ExecQueryNoResult(query string) error
- func (hc *HiveConn) ExecQueryToStruct(query string, data any) error
- func (hc *HiveConn) GetHiveConn() (err error)
- type HiveConnInformation
- type KrbAuth
- type PgDB
- func (p *PgDB) ExecQuery(query string, args ...interface{}) (list []map[string]interface{}, err error)
- func (p *PgDB) ExecQueryNoResult(query string, args ...interface{}) (err error)
- func (p *PgDB) ExecQueryToString(query string, args ...interface{}) (list []map[string]string, err error)
- func (p *PgDB) ExecQueryToStruct(query string, data any, args ...interface{}) (err error)
- type SQLDB
- func (s *SQLDB) ExecQuery(query string, args ...interface{}) (list []map[string]interface{}, err error)
- func (s *SQLDB) ExecQueryBatchSize(query string, batchSize int, ...) (err error)
- func (s *SQLDB) ExecQueryNoResult(query string, args ...interface{}) (err error)
- func (s *SQLDB) ExecQueryToString(query string, args ...interface{}) (list []map[string]string, err error)
- func (s *SQLDB) ExecQueryToStruct(query string, data any, args ...interface{}) (err error)
Constants ¶
View Source
const ( DefaultKrbConfPath = "/etc/krb5.conf" DefaultKinitProgram = "/usr/bin/kinit" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HiveConn ¶
type HiveConn struct { KA *KrbAuth HCI *HiveConnInformation Conn *gohive.Connection RetryCount int RetryInterval time.Duration QueryTimeout int }
func NewHiveConn ¶
func (*HiveConn) ExecQueryBatchSize ¶
func (*HiveConn) ExecQueryNoResult ¶
func (*HiveConn) ExecQueryToStruct ¶
ExecQueryToStruct @Description: @param query @param data pointer @return []map[string]interface{} @return error
func (*HiveConn) GetHiveConn ¶
type HiveConnInformation ¶
type KrbAuth ¶
type KrbAuth struct { KrbConfPath string KinitProgramPath string KeyTabFilePath string Principal string }
func NewKrbAuth ¶
type PgDB ¶
func InitPGConn ¶
func (*PgDB) ExecQueryNoResult ¶
func (*PgDB) ExecQueryToString ¶
type SQLDB ¶
func (*SQLDB) ExecQueryBatchSize ¶
func (*SQLDB) ExecQueryNoResult ¶
func (*SQLDB) ExecQueryToString ¶
Click to show internal directories.
Click to hide internal directories.