dao

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureDB_Protocal_Version_F    = byte('F')
	FeatureDB_IfNull_Flag_Version_1 = byte('1')
)

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
	HBasePrefix         string
	HBaseName           string
	HBaseTable          string
	ColumnFamily        string
	Qualifier           string

	PrimaryKeyField string
	EventTimeField  string
	TTL             int

	// hologres
	HologresName      string
	HologresTableName string

	//tablestore
	TableStoreName      string
	TableStoreTableName 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, tablestore, featuredb
	FieldTypeMap map[string]constants.FSType

	// redis, featuredb
	Fields []string

	// hologres sequence tables
	HologresOnlineTableName  string
	HologresOfflineTableName string
	// tablestore sequence tables
	TableStoreOnlineTableName  string
	TableStoreOfflineTableName string
	// igraph sequence table
	IgraphEdgeName string

	// featuredb
	FeatureDBDatabaseName string
	FeatureDBSchemaName   string
	FeatureDBTableName    string
	FeatureDBSignature    string
}

type FeatureViewDao

type FeatureViewDao interface {
	GetFeatures(keys []interface{}, selectFields []string) ([]map[string]interface{}, error)
	GetUserSequenceFeature(keys []interface{}, userIdField string, sequenceConfig api.FeatureViewSeqConfig, onlineConfig []*api.SeqConfig) ([]map[string]interface{}, error)
}

func NewFeatureViewDao

func NewFeatureViewDao(config DaoConfig) FeatureViewDao

type FeatureViewFeatureDBDao added in v2.0.7

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

func NewFeatureViewFeatureDBDao added in v2.0.7

func NewFeatureViewFeatureDBDao(config DaoConfig) *FeatureViewFeatureDBDao

func (*FeatureViewFeatureDBDao) GetFeatures added in v2.0.7

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

func (*FeatureViewFeatureDBDao) GetUserSequenceFeature added in v2.0.7

func (d *FeatureViewFeatureDBDao) GetUserSequenceFeature(keys []interface{}, userIdField string, sequenceConfig api.FeatureViewSeqConfig, onlineConfig []*api.SeqConfig) ([]map[string]interface{}, error)

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)

func (*FeatureViewHologresDao) GetUserSequenceFeature added in v2.0.5

func (d *FeatureViewHologresDao) GetUserSequenceFeature(keys []interface{}, userIdField string, sequenceConfig api.FeatureViewSeqConfig, onlineConfig []*api.SeqConfig) ([]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)

func (*FeatureViewIGraphDao) GetUserSequenceFeature added in v2.0.5

func (d *FeatureViewIGraphDao) GetUserSequenceFeature(keys []interface{}, userIdField string, sequenceConfig api.FeatureViewSeqConfig, onlineConfig []*api.SeqConfig) ([]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)

func (*FeatureViewMysqlDao) GetUserSequenceFeature added in v2.0.5

func (d *FeatureViewMysqlDao) GetUserSequenceFeature(keys []interface{}, userIdField string, sequenceConfig api.FeatureViewSeqConfig, onlineConfig []*api.SeqConfig) ([]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)

func (*FeatureViewRedisDao) GetUserSequenceFeature added in v2.0.5

func (d *FeatureViewRedisDao) GetUserSequenceFeature(keys []interface{}, userIdField string, sequenceConfig api.FeatureViewSeqConfig, onlineConfig []*api.SeqConfig) ([]map[string]interface{}, error)

type FeatureViewTableStoreDao added in v2.0.5

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

func NewFeatureViewTableStoreDao added in v2.0.5

func NewFeatureViewTableStoreDao(config DaoConfig) *FeatureViewTableStoreDao

func (*FeatureViewTableStoreDao) GetFeatures added in v2.0.5

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

func (*FeatureViewTableStoreDao) GetUserSequenceFeature added in v2.0.5

func (d *FeatureViewTableStoreDao) GetUserSequenceFeature(keys []interface{}, userIdField string, sequenceConfig api.FeatureViewSeqConfig, onlineConfig []*api.SeqConfig) ([]map[string]interface{}, error)

Jump to

Keyboard shortcuts

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