mysql

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB represents a logical connection to mysql database

func NewDB

func NewDB(xdb *sqlx.DB, tx *sqlx.Tx) *DB

NewDB returns an instance of DB, which is a logical connection to the underlying mysql database

func (*DB) BeginTx

func (mdb *DB) BeginTx() (sqldb.Tx, error)

BeginTx starts a new transaction and returns a reference to the Tx object

func (*DB) Close

func (mdb *DB) Close() error

Close closes the connection to the mysql db

func (*DB) Commit

func (mdb *DB) Commit() error

Commit commits a previously started transaction

func (*DB) DeleteFromActivityInfoMaps

func (mdb *DB) DeleteFromActivityInfoMaps(filter *sqldb.ActivityInfoMapsFilter) (sql.Result, error)

DeleteFromActivityInfoMaps deletes one or more rows from activity_info_maps table

func (*DB) DeleteFromBufferedEvents

func (mdb *DB) DeleteFromBufferedEvents(filter *sqldb.BufferedEventsFilter) (sql.Result, error)

DeleteFromBufferedEvents deletes one or more rows from buffered_events table

func (*DB) DeleteFromChildExecutionInfoMaps

func (mdb *DB) DeleteFromChildExecutionInfoMaps(filter *sqldb.ChildExecutionInfoMapsFilter) (sql.Result, error)

DeleteFromChildExecutionInfoMaps deletes one or more rows from child_execution_info_maps table

func (*DB) DeleteFromCurrentExecutions

func (mdb *DB) DeleteFromCurrentExecutions(filter *sqldb.CurrentExecutionsFilter) (sql.Result, error)

DeleteFromCurrentExecutions deletes a single row in current_executions table

func (*DB) DeleteFromDomain

func (mdb *DB) DeleteFromDomain(filter *sqldb.DomainFilter) (sql.Result, error)

DeleteFromDomain deletes a single row in domains table

func (*DB) DeleteFromEvents

func (mdb *DB) DeleteFromEvents(filter *sqldb.EventsFilter) (sql.Result, error)

DeleteFromEvents deletes one or more rows from events table

func (*DB) DeleteFromExecutions

func (mdb *DB) DeleteFromExecutions(filter *sqldb.ExecutionsFilter) (sql.Result, error)

DeleteFromExecutions deletes a single row from executions table

func (*DB) DeleteFromHistoryNode added in v0.5.7

func (mdb *DB) DeleteFromHistoryNode(filter *sqldb.HistoryNodeFilter) (sql.Result, error)

DeleteFromHistoryNode deletes one or more rows from history_node table

func (*DB) DeleteFromHistoryTree added in v0.5.7

func (mdb *DB) DeleteFromHistoryTree(filter *sqldb.HistoryTreeFilter) (sql.Result, error)

DeleteFromHistoryTree deletes one or more rows from history_tree table

func (*DB) DeleteFromReplicationTasks

func (mdb *DB) DeleteFromReplicationTasks(filter *sqldb.ReplicationTasksFilter) (sql.Result, error)

DeleteFromReplicationTasks deletes one or more rows from replication_tasks table

func (*DB) DeleteFromRequestCancelInfoMaps

func (mdb *DB) DeleteFromRequestCancelInfoMaps(filter *sqldb.RequestCancelInfoMapsFilter) (sql.Result, error)

DeleteFromRequestCancelInfoMaps deletes one or more rows from request_cancel_info_maps table

func (*DB) DeleteFromSignalInfoMaps

func (mdb *DB) DeleteFromSignalInfoMaps(filter *sqldb.SignalInfoMapsFilter) (sql.Result, error)

DeleteFromSignalInfoMaps deletes one or more rows from signal_info_maps table

func (*DB) DeleteFromSignalsRequestedSets

func (mdb *DB) DeleteFromSignalsRequestedSets(filter *sqldb.SignalsRequestedSetsFilter) (sql.Result, error)

DeleteFromSignalsRequestedSets deletes one or more rows from signals_requested_sets table

func (*DB) DeleteFromTaskLists

func (mdb *DB) DeleteFromTaskLists(filter *sqldb.TaskListsFilter) (sql.Result, error)

DeleteFromTaskLists deletes a row from task_lists table

func (*DB) DeleteFromTasks

func (mdb *DB) DeleteFromTasks(filter *sqldb.TasksFilter) (sql.Result, error)

DeleteFromTasks deletes one or more rows from tasks table

func (*DB) DeleteFromTimerInfoMaps

func (mdb *DB) DeleteFromTimerInfoMaps(filter *sqldb.TimerInfoMapsFilter) (sql.Result, error)

DeleteFromTimerInfoMaps deletes one or more rows from timer_info_maps table

func (*DB) DeleteFromTimerTasks

func (mdb *DB) DeleteFromTimerTasks(filter *sqldb.TimerTasksFilter) (sql.Result, error)

DeleteFromTimerTasks deletes one or more rows from timer_tasks table

func (*DB) DeleteFromTransferTasks

func (mdb *DB) DeleteFromTransferTasks(filter *sqldb.TransferTasksFilter) (sql.Result, error)

DeleteFromTransferTasks deletes one or more rows from transfer_tasks table

func (*DB) DeleteFromVisibility added in v0.5.7

func (mdb *DB) DeleteFromVisibility(filter *sqldb.VisibilityFilter) (sql.Result, error)

DeleteFromVisibility deletes a row from visibility table if it exist

func (*DB) DriverName

func (mdb *DB) DriverName() string

DriverName returns the name of the mysql driver

func (*DB) InsertIntoBufferedEvents

func (mdb *DB) InsertIntoBufferedEvents(rows []sqldb.BufferedEventsRow) (sql.Result, error)

InsertIntoBufferedEvents inserts one or more rows into buffered_events table

func (*DB) InsertIntoCurrentExecutions

func (mdb *DB) InsertIntoCurrentExecutions(row *sqldb.CurrentExecutionsRow) (sql.Result, error)

InsertIntoCurrentExecutions inserts a single row into current_executions table

func (*DB) InsertIntoDomain

func (mdb *DB) InsertIntoDomain(row *sqldb.DomainRow) (sql.Result, error)

InsertIntoDomain inserts a single row into domains table

func (*DB) InsertIntoEvents

func (mdb *DB) InsertIntoEvents(row *sqldb.EventsRow) (sql.Result, error)

InsertIntoEvents inserts a row into events table

func (*DB) InsertIntoExecutions

func (mdb *DB) InsertIntoExecutions(row *sqldb.ExecutionsRow) (sql.Result, error)

InsertIntoExecutions inserts a row into executions table

func (*DB) InsertIntoHistoryNode added in v0.5.7

func (mdb *DB) InsertIntoHistoryNode(row *sqldb.HistoryNodeRow) (sql.Result, error)

InsertIntoHistoryNode inserts a row into history_node table

func (*DB) InsertIntoHistoryTree added in v0.5.7

func (mdb *DB) InsertIntoHistoryTree(row *sqldb.HistoryTreeRow) (sql.Result, error)

InsertIntoHistoryTree inserts a row into history_tree table

func (*DB) InsertIntoReplicationTasks

func (mdb *DB) InsertIntoReplicationTasks(rows []sqldb.ReplicationTasksRow) (sql.Result, error)

InsertIntoReplicationTasks inserts one or more rows into replication_tasks table

func (*DB) InsertIntoShards

func (mdb *DB) InsertIntoShards(row *sqldb.ShardsRow) (sql.Result, error)

InsertIntoShards inserts one or more rows into shards table

func (*DB) InsertIntoSignalsRequestedSets

func (mdb *DB) InsertIntoSignalsRequestedSets(rows []sqldb.SignalsRequestedSetsRow) (sql.Result, error)

InsertIntoSignalsRequestedSets inserts one or more rows into signals_requested_sets table

func (*DB) InsertIntoTaskLists

func (mdb *DB) InsertIntoTaskLists(row *sqldb.TaskListsRow) (sql.Result, error)

InsertIntoTaskLists inserts one or more rows into task_lists table

func (*DB) InsertIntoTasks

func (mdb *DB) InsertIntoTasks(rows []sqldb.TasksRow) (sql.Result, error)

InsertIntoTasks inserts one or more rows into tasks table

func (*DB) InsertIntoTimerTasks

func (mdb *DB) InsertIntoTimerTasks(rows []sqldb.TimerTasksRow) (sql.Result, error)

InsertIntoTimerTasks inserts one or more rows into timer_tasks table

func (*DB) InsertIntoTransferTasks

func (mdb *DB) InsertIntoTransferTasks(rows []sqldb.TransferTasksRow) (sql.Result, error)

InsertIntoTransferTasks inserts one or more rows into transfer_tasks table

func (*DB) InsertIntoVisibility

func (mdb *DB) InsertIntoVisibility(row *sqldb.VisibilityRow) (sql.Result, error)

InsertIntoVisibility inserts a row into visibility table. If an row already exist, its left as such and no update will be made

func (*DB) LockCurrentExecutions

func (mdb *DB) LockCurrentExecutions(filter *sqldb.CurrentExecutionsFilter) (*sqldb.CurrentExecutionsRow, error)

LockCurrentExecutions acquires a write lock on a single row in current_executions table

func (*DB) LockCurrentExecutionsJoinExecutions

func (mdb *DB) LockCurrentExecutionsJoinExecutions(filter *sqldb.CurrentExecutionsFilter) ([]sqldb.CurrentExecutionsRow, error)

LockCurrentExecutionsJoinExecutions joins a row in current_executions with executions table and acquires a write lock on the result

func (*DB) LockDomainMetadata

func (mdb *DB) LockDomainMetadata() error

LockDomainMetadata acquires a write lock on a single row in domain_metadata table

func (*DB) LockEvents

func (mdb *DB) LockEvents(filter *sqldb.EventsFilter) (*sqldb.EventsRow, error)

LockEvents acquires a write lock on a single row in events table

func (*DB) LockTaskLists

func (mdb *DB) LockTaskLists(filter *sqldb.TaskListsFilter) (int64, error)

LockTaskLists locks a row in task_lists table

func (*DB) ReadLockExecutions added in v0.5.7

func (mdb *DB) ReadLockExecutions(filter *sqldb.ExecutionsFilter) (int, error)

ReadLockExecutions acquires a write lock on a single row in executions table

func (*DB) ReadLockShards

func (mdb *DB) ReadLockShards(filter *sqldb.ShardsFilter) (int, error)

ReadLockShards acquires a read lock on a single row in shards table

func (*DB) ReplaceIntoActivityInfoMaps

func (mdb *DB) ReplaceIntoActivityInfoMaps(rows []sqldb.ActivityInfoMapsRow) (sql.Result, error)

ReplaceIntoActivityInfoMaps replaces one or more rows in activity_info_maps table

func (*DB) ReplaceIntoChildExecutionInfoMaps

func (mdb *DB) ReplaceIntoChildExecutionInfoMaps(rows []sqldb.ChildExecutionInfoMapsRow) (sql.Result, error)

ReplaceIntoChildExecutionInfoMaps replaces one or more rows in child_execution_info_maps table

func (*DB) ReplaceIntoRequestCancelInfoMaps

func (mdb *DB) ReplaceIntoRequestCancelInfoMaps(rows []sqldb.RequestCancelInfoMapsRow) (sql.Result, error)

ReplaceIntoRequestCancelInfoMaps replaces one or more rows in request_cancel_info_maps table

func (*DB) ReplaceIntoSignalInfoMaps

func (mdb *DB) ReplaceIntoSignalInfoMaps(rows []sqldb.SignalInfoMapsRow) (sql.Result, error)

ReplaceIntoSignalInfoMaps replaces one or more rows in signal_info_maps table

func (*DB) ReplaceIntoTaskLists

func (mdb *DB) ReplaceIntoTaskLists(row *sqldb.TaskListsRow) (sql.Result, error)

ReplaceIntoTaskLists replaces one or more rows in task_lists table

func (*DB) ReplaceIntoTimerInfoMaps

func (mdb *DB) ReplaceIntoTimerInfoMaps(rows []sqldb.TimerInfoMapsRow) (sql.Result, error)

ReplaceIntoTimerInfoMaps replaces one or more rows in timer_info_maps table

func (*DB) ReplaceIntoVisibility added in v0.5.7

func (mdb *DB) ReplaceIntoVisibility(row *sqldb.VisibilityRow) (sql.Result, error)

ReplaceIntoVisibility replaces an existing row if it exist or creates a new row in visibility table

func (*DB) Rollback

func (mdb *DB) Rollback() error

Rollback triggers rollback of a previously started transaction

func (*DB) SelectFromActivityInfoMaps

func (mdb *DB) SelectFromActivityInfoMaps(filter *sqldb.ActivityInfoMapsFilter) ([]sqldb.ActivityInfoMapsRow, error)

SelectFromActivityInfoMaps reads one or more rows from activity_info_maps table

func (*DB) SelectFromBufferedEvents

func (mdb *DB) SelectFromBufferedEvents(filter *sqldb.BufferedEventsFilter) ([]sqldb.BufferedEventsRow, error)

SelectFromBufferedEvents reads one or more rows from buffered_events table

func (*DB) SelectFromChildExecutionInfoMaps

func (mdb *DB) SelectFromChildExecutionInfoMaps(filter *sqldb.ChildExecutionInfoMapsFilter) ([]sqldb.ChildExecutionInfoMapsRow, error)

SelectFromChildExecutionInfoMaps reads one or more rows from child_execution_info_maps table

func (*DB) SelectFromCurrentExecutions

func (mdb *DB) SelectFromCurrentExecutions(filter *sqldb.CurrentExecutionsFilter) (*sqldb.CurrentExecutionsRow, error)

SelectFromCurrentExecutions reads one or more rows from current_executions table

func (*DB) SelectFromDomain

func (mdb *DB) SelectFromDomain(filter *sqldb.DomainFilter) ([]sqldb.DomainRow, error)

SelectFromDomain reads one or more rows from domains table

func (*DB) SelectFromDomainMetadata

func (mdb *DB) SelectFromDomainMetadata() (*sqldb.DomainMetadataRow, error)

SelectFromDomainMetadata reads a single row in domain_metadata table

func (*DB) SelectFromEvents

func (mdb *DB) SelectFromEvents(filter *sqldb.EventsFilter) ([]sqldb.EventsRow, error)

SelectFromEvents reads one or more rows from events table

func (*DB) SelectFromExecutions

func (mdb *DB) SelectFromExecutions(filter *sqldb.ExecutionsFilter) (*sqldb.ExecutionsRow, error)

SelectFromExecutions reads a single row from executions table

func (*DB) SelectFromHistoryNode added in v0.5.7

func (mdb *DB) SelectFromHistoryNode(filter *sqldb.HistoryNodeFilter) ([]sqldb.HistoryNodeRow, error)

SelectFromHistoryNode reads one or more rows from history_node table

func (*DB) SelectFromHistoryTree added in v0.5.7

func (mdb *DB) SelectFromHistoryTree(filter *sqldb.HistoryTreeFilter) ([]sqldb.HistoryTreeRow, error)

SelectFromHistoryTree reads one or more rows from history_tree table

func (*DB) SelectFromReplicationTasks

func (mdb *DB) SelectFromReplicationTasks(filter *sqldb.ReplicationTasksFilter) ([]sqldb.ReplicationTasksRow, error)

SelectFromReplicationTasks reads one or more rows from replication_tasks table

func (*DB) SelectFromRequestCancelInfoMaps

func (mdb *DB) SelectFromRequestCancelInfoMaps(filter *sqldb.RequestCancelInfoMapsFilter) ([]sqldb.RequestCancelInfoMapsRow, error)

SelectFromRequestCancelInfoMaps reads one or more rows from request_cancel_info_maps table

func (*DB) SelectFromShards

func (mdb *DB) SelectFromShards(filter *sqldb.ShardsFilter) (*sqldb.ShardsRow, error)

SelectFromShards reads one or more rows from shards table

func (*DB) SelectFromSignalInfoMaps

func (mdb *DB) SelectFromSignalInfoMaps(filter *sqldb.SignalInfoMapsFilter) ([]sqldb.SignalInfoMapsRow, error)

SelectFromSignalInfoMaps reads one or more rows from signal_info_maps table

func (*DB) SelectFromSignalsRequestedSets

func (mdb *DB) SelectFromSignalsRequestedSets(filter *sqldb.SignalsRequestedSetsFilter) ([]sqldb.SignalsRequestedSetsRow, error)

SelectFromSignalsRequestedSets reads one or more rows from signals_requested_sets table

func (*DB) SelectFromTaskLists

func (mdb *DB) SelectFromTaskLists(filter *sqldb.TaskListsFilter) ([]sqldb.TaskListsRow, error)

SelectFromTaskLists reads one or more rows from task_lists table

func (*DB) SelectFromTasks

func (mdb *DB) SelectFromTasks(filter *sqldb.TasksFilter) ([]sqldb.TasksRow, error)

SelectFromTasks reads one or more rows from tasks table

func (*DB) SelectFromTimerInfoMaps

func (mdb *DB) SelectFromTimerInfoMaps(filter *sqldb.TimerInfoMapsFilter) ([]sqldb.TimerInfoMapsRow, error)

SelectFromTimerInfoMaps reads one or more rows from timer_info_maps table

func (*DB) SelectFromTimerTasks

func (mdb *DB) SelectFromTimerTasks(filter *sqldb.TimerTasksFilter) ([]sqldb.TimerTasksRow, error)

SelectFromTimerTasks reads one or more rows from timer_tasks table

func (*DB) SelectFromTransferTasks

func (mdb *DB) SelectFromTransferTasks(filter *sqldb.TransferTasksFilter) ([]sqldb.TransferTasksRow, error)

SelectFromTransferTasks reads one or more rows from transfer_tasks table

func (*DB) SelectFromVisibility

func (mdb *DB) SelectFromVisibility(filter *sqldb.VisibilityFilter) ([]sqldb.VisibilityRow, error)

SelectFromVisibility reads one or more rows from visibility table

func (*DB) UpdateCurrentExecutions

func (mdb *DB) UpdateCurrentExecutions(row *sqldb.CurrentExecutionsRow) (sql.Result, error)

UpdateCurrentExecutions updates a single row in current_executions table

func (*DB) UpdateDomain

func (mdb *DB) UpdateDomain(row *sqldb.DomainRow) (sql.Result, error)

UpdateDomain updates a single row in domains table

func (*DB) UpdateDomainMetadata

func (mdb *DB) UpdateDomainMetadata(row *sqldb.DomainMetadataRow) (sql.Result, error)

UpdateDomainMetadata updates a single row in domain_metadata table

func (*DB) UpdateEvents

func (mdb *DB) UpdateEvents(row *sqldb.EventsRow) (sql.Result, error)

UpdateEvents updates a row in events table

func (*DB) UpdateExecutions

func (mdb *DB) UpdateExecutions(row *sqldb.ExecutionsRow) (sql.Result, error)

UpdateExecutions updates a single row in executions table

func (*DB) UpdateHistoryTree added in v0.5.7

func (mdb *DB) UpdateHistoryTree(row *sqldb.HistoryTreeRow) (sql.Result, error)

UpdateHistoryTree updates a row in history_tree table

func (*DB) UpdateShards

func (mdb *DB) UpdateShards(row *sqldb.ShardsRow) (sql.Result, error)

UpdateShards updates one or more rows into shards table

func (*DB) UpdateTaskLists

func (mdb *DB) UpdateTaskLists(row *sqldb.TaskListsRow) (sql.Result, error)

UpdateTaskLists updates a row in task_lists table

func (*DB) WriteLockExecutions added in v0.5.7

func (mdb *DB) WriteLockExecutions(filter *sqldb.ExecutionsFilter) (int, error)

WriteLockExecutions acquires a write lock on a single row in executions table

func (*DB) WriteLockShards

func (mdb *DB) WriteLockShards(filter *sqldb.ShardsFilter) (int, error)

WriteLockShards acquires a write lock on a single row in shards table

type DataConverter

type DataConverter interface {
	ToMySQLDateTime(t time.Time) time.Time
	FromMySQLDateTime(t time.Time) time.Time
}

DataConverter defines the API for conversions to/from go types to mysql datatypes

Jump to

Keyboard shortcuts

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