dao

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnValues

func ColumnValues(columns []*sql.ColumnType) []interface{}

ColumnValues return dynamic column values by the sql.ColumnType

func Md5

func Md5(msg string) string

func ParseColumnValues

func ParseColumnValues(value interface{}) interface{}

ParseColumnValues return true value of column value. Retrun nil if the column value is not valid, like nullable.

Types

type DaoConfig

type DaoConfig struct {
	DatasourceType      string
	RedisName           string
	RedisPrefix         string
	RedisDefaultKey     string
	RedisValueDelimeter string
	MysqlName           string
	MysqlTableName      string
	Config              string
	TableStoreName      string
	TableStoreTableName string
	HBasePrefix         string
	HBaseName           string
	HBaseTable          string
	ColumnFamily        string
	Qualifier           string

	PrimaryKeyField string
	EventTimeField  string
	TTL             int

	// hologres
	HologresName      string
	HologresTableName string

	//ots
	OtsName      string
	OtsTableName string

	// clickhouse
	ClickHouseName      string
	ClickHouseTableName string

	// be engine
	BeName               string
	BizName              string
	BeTableName          string
	BeExposureUserIdName string
	BeExposureItemIdName string

	// igraph
	IGraphName        string
	GroupName         string
	LabelName         string
	SaveOriginalField bool

	FieldMap map[string]string
	// redis, ots
	FieldTypeMap map[string]constants.FSType

	// redis
	Fields []string
}

type FeatureViewDao

type FeatureViewDao interface {
	GetFeatures(keys []interface{}, selectFields []string) ([]map[string]interface{}, error)
}

func NewFeatureViewDao

func NewFeatureViewDao(config DaoConfig) FeatureViewDao

type FeatureViewHologresDao

type FeatureViewHologresDao struct {
	// contains filtered or unexported fields
}

func NewFeatureViewHologresDao

func NewFeatureViewHologresDao(config DaoConfig) *FeatureViewHologresDao

func (*FeatureViewHologresDao) GetFeatures

func (d *FeatureViewHologresDao) GetFeatures(keys []interface{}, selectFields []string) ([]map[string]interface{}, error)

type FeatureViewIGraphDao

type FeatureViewIGraphDao struct {
	// contains filtered or unexported fields
}

func NewFeatureViewIGraphDao

func NewFeatureViewIGraphDao(config DaoConfig) *FeatureViewIGraphDao

func (*FeatureViewIGraphDao) GetFeatures

func (d *FeatureViewIGraphDao) GetFeatures(keys []interface{}, selectFields []string) ([]map[string]interface{}, error)

type FeatureViewMysqlDao

type FeatureViewMysqlDao struct {
	// contains filtered or unexported fields
}

func NewFeatureViewMysqlDao

func NewFeatureViewMysqlDao(config DaoConfig) *FeatureViewMysqlDao

func (*FeatureViewMysqlDao) GetFeatures

func (d *FeatureViewMysqlDao) GetFeatures(keys []interface{}, selectFields []string) ([]map[string]interface{}, error)

type FeatureViewOTSDao added in v1.0.1

type FeatureViewOTSDao struct {
	// contains filtered or unexported fields
}

func NewFeatureViewOTSDao added in v1.0.1

func NewFeatureViewOTSDao(config DaoConfig) *FeatureViewOTSDao

func (*FeatureViewOTSDao) GetFeatures added in v1.0.1

func (d *FeatureViewOTSDao) GetFeatures(keys []interface{}, selectFields []string) ([]map[string]interface{}, error)

type FeatureViewRedisDao

type FeatureViewRedisDao struct {
	// contains filtered or unexported fields
}

func NewFeatureViewRedisDao

func NewFeatureViewRedisDao(config DaoConfig) *FeatureViewRedisDao

func (*FeatureViewRedisDao) GetFeatures

func (d *FeatureViewRedisDao) GetFeatures(keys []interface{}, selectFields []string) ([]map[string]interface{}, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL