sqlkv

package
v0.0.0-...-2a7ba7a Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WhereClauseWithJobID     = "job_id = ?"
	WhereClauseWithKeyRange  = "meta_key >= ? AND meta_key < ?"
	WhereClauseWithKeyPrefix = "meta_key like ?"
	WhereClauseWithFromKey   = "meta_key >= ?"
	WhereClauseWithKey       = "meta_key = ?"
)

Where clause for meta kv option NOTE: 'job_id' and 'meta_key' MUST be same as backend table

Variables

This section is empty.

Functions

func NewClientConnImpl

func NewClientConnImpl(storeConf *model.StoreConfig) (*clientConnImpl, error)

NewClientConnImpl return a new clientConnImpl

func NewSQLDB

func NewSQLDB(storeConf *model.StoreConfig) (*sql.DB, error)

NewSQLDB news a sql.DB.

func NewSQLKVClientImpl

func NewSQLKVClientImpl(sqlDB *sql.DB, storeType metaModel.StoreType, table string,
	jobID metaModel.JobID,
) (*sqlKVClientImpl, error)

NewSQLKVClientImpl new a sql implement for kvclient

Types

type ClientBuilderImpl

type ClientBuilderImpl struct{}

ClientBuilderImpl is the implement of ClientBuilder for sqlkv

func (*ClientBuilderImpl) ClientType

func (b *ClientBuilderImpl) ClientType() model.ClientType

ClientType implements ClientType of clientBuilder

func (*ClientBuilderImpl) NewKVClientWithNamespace

func (b *ClientBuilderImpl) NewKVClientWithNamespace(cc model.ClientConn,
	projectID model.ProjectID, jobID model.JobID,
) (model.KVClient, error)

NewKVClientWithNamespace implements NewKVClientWithNamespace of clientBuilder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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