sql

package
v1.2.14 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 34 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegisteredPluginNames added in v0.21.2

func GetRegisteredPluginNames() []string

GetRegisteredPluginNames returns the list of registered plugin names

func NewHistoryV2Persistence added in v0.22.0

func NewHistoryV2Persistence(
	db sqlplugin.DB,
	logger log.Logger,
	parser serialization.Parser,
) (persistence.HistoryStore, error)

NewHistoryV2Persistence creates an instance of HistoryManager

func NewSQLAdminDB added in v0.11.0

func NewSQLAdminDB(cfg *config.SQL) (sqlplugin.AdminDB, error)

NewSQLAdminDB returns a AdminDB

func NewSQLConfigStore added in v1.2.1

func NewSQLConfigStore(
	db sqlplugin.DB,
	logger log.Logger,
	parser serialization.Parser,
) (persistence.ConfigStore, error)

NewSQLConfigStore creates a config store for SQL

func NewSQLDB added in v0.11.0

func NewSQLDB(cfg *config.SQL) (sqlplugin.DB, error)

NewSQLDB creates a returns a reference to a logical connection to the underlying SQL database. The returned object is to tied to a single SQL database and the object can be used to perform CRUD operations on the tables in the database

func NewSQLExecutionStore added in v0.5.0

func NewSQLExecutionStore(
	db sqlplugin.DB,
	logger log.Logger,
	shardID int,
	parser serialization.Parser,
	dc *p.DynamicConfiguration,
) (p.ExecutionStore, error)

NewSQLExecutionStore creates an instance of ExecutionStore

func NewSQLVisibilityStore added in v0.5.0

func NewSQLVisibilityStore(cfg config.SQL, logger log.Logger) (p.VisibilityStore, error)

NewSQLVisibilityStore creates an instance of ExecutionStore

func NewShardPersistence added in v0.22.0

func NewShardPersistence(
	db sqlplugin.DB,
	currentClusterName string,
	log log.Logger,
	parser serialization.Parser,
) (persistence.ShardStore, error)

NewShardPersistence creates an instance of ShardStore

func NewTestCluster

func NewTestCluster(pluginName, dbName, username, password, host string, port int, schemaDir string) (testcluster.PersistenceTestCluster, error)

NewTestCluster returns a new SQL test cluster

func PluginRegistered added in v0.19.1

func PluginRegistered(pluginName string) bool

PluginRegistered returns true if plugin with given name has been registered, false otherwise

func RegisterPlugin added in v0.11.0

func RegisterPlugin(pluginName string, plugin sqlplugin.Plugin)

RegisterPlugin will register a SQL plugin

func RegisterPluginIfNotExists added in v0.19.1

func RegisterPluginIfNotExists(pluginName string, plugin sqlplugin.Plugin)

RegisterPluginIfNotExists will register a SQL plugin only if a plugin with same name has not already been registered

Types

type Factory

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

Factory vends store objects backed by MySQL

func NewFactory

func NewFactory(
	cfg config.SQL,
	clusterName string,
	logger log.Logger,
	parser serialization.Parser,
	dc *p.DynamicConfiguration,
) *Factory

NewFactory returns an instance of a factory object which can be used to create datastores backed by any kind of SQL store

func (*Factory) Close

func (f *Factory) Close()

Close closes the factory

func (*Factory) NewConfigStore added in v0.23.1

func (f *Factory) NewConfigStore() (p.ConfigStore, error)

NewConfigStore returns a new config store backed by sql. Not Yet Implemented.

func (*Factory) NewDomainStore added in v0.23.1

func (f *Factory) NewDomainStore() (p.DomainStore, error)

NewDomainStore returns a new metadata store

func (*Factory) NewExecutionStore

func (f *Factory) NewExecutionStore(shardID int) (p.ExecutionStore, error)

NewExecutionStore returns an ExecutionStore for a given shardID

func (*Factory) NewHistoryStore

func (f *Factory) NewHistoryStore() (p.HistoryStore, error)

NewHistoryStore returns a new history store

func (*Factory) NewQueue added in v0.9.3

func (f *Factory) NewQueue(queueType p.QueueType) (p.Queue, error)

NewQueue returns a new queue backed by sql

func (*Factory) NewShardStore

func (f *Factory) NewShardStore() (p.ShardStore, error)

NewShardStore returns a new shard store

func (*Factory) NewTaskStore

func (f *Factory) NewTaskStore() (p.TaskStore, error)

NewTaskStore returns a new task store

func (*Factory) NewVisibilityStore

func (f *Factory) NewVisibilityStore(sortByCloseTime bool) (p.VisibilityStore, error)

NewVisibilityStore returns a visibility store TODO sortByCloseTime will be removed and implemented for https://github.com/uber/cadence/issues/3621

Directories

Path Synopsis
Package sqldriver is a generated GoMock package.
Package sqldriver is a generated GoMock package.
Package sqlplugin is a generated GoMock package.
Package sqlplugin is a generated GoMock package.

Jump to

Keyboard shortcuts

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