Documentation
¶
Index ¶
- Constants
- func CreateDatabase(cfg config.SQL, name string) error
- func CreateDatabaseByCli(cli *cli.Context, extensionName string) error
- func DropDatabase(cfg config.SQL, name string) error
- func RegisterSQLDBExtension(name string, ext SQLDBExtension)
- func SetupSchema(cfg *config.SQL, filePath string) error
- func SetupSchemaByCli(cli *cli.Context, extensionName string) error
- func ValidateConnectConfig(cfg *config.SQL) error
- type AppDatabaseTableRow
- type AppDatabaseTableRowSelect
- type AsyncStateExecutionRow
- type AsyncStateExecutionRowForUpdate
- type AsyncStateExecutionRowForUpdateWithoutCommands
- type AsyncStateExecutionSelectFilter
- type ErrorChecker
- type ExecutionVisibilityRow
- type ImmediateTaskRangeDeleteFilter
- type ImmediateTaskRow
- type ImmediateTaskRowDeleteFilter
- type ImmediateTaskRowForInsert
- type LatestProcessExecutionRow
- type LocalAttributeRow
- type LocalQueueMessageRow
- type ProcessExecutionRow
- type ProcessExecutionRowForUpdate
- type SQLAdminDBSession
- type SQLDBExtension
- type SQLDBSession
- type SQLTransaction
- type TimerTaskRangeSelectFilter
- type TimerTaskRow
- type TimerTaskRowDeleteFilter
- type TimerTaskRowForInsert
- type TimerTaskSelectByTimestampsFilter
Constants ¶
View Source
const ( // CLIFlagEndpoint is the cli option for endpoint CLIFlagEndpoint = "endpoint" // CLIFlagPort is the cli option for port CLIFlagPort = "port" // CLIFlagUser is the cli option for user CLIFlagUser = "user" // CLIFlagPassword is the cli option for password CLIFlagPassword = "password" CLIFlagDatabase = "database" CLIFlagFile = "file" )
Variables ¶
This section is empty.
Functions ¶
func CreateDatabaseByCli ¶
CreateDatabaseByCli creates a sql database
func RegisterSQLDBExtension ¶
func RegisterSQLDBExtension(name string, ext SQLDBExtension)
RegisterSQLDBExtension will register a SQL extension
func SetupSchemaByCli ¶
SetupSchemaByCli setup schema for a new database
func ValidateConnectConfig ¶
ValidateConnectConfig validates params
Types ¶
type AppDatabaseTableRow ¶
type AsyncStateExecutionRow ¶
type AsyncStateExecutionRow struct {
ProcessExecutionId uuid.UUID
// See the top of the file for why we need this field
ProcessExecutionIdString string
StateId string
StateIdSequence int32
Status data_models.StateExecutionStatus
WaitUntilCommands types.JSONText
WaitUntilCommandResults types.JSONText
PreviousVersion int32 // for conditional check
LastFailure types.JSONText
Input types.JSONText
Info types.JSONText
}
type AsyncStateExecutionRowForUpdate ¶
type AsyncStateExecutionRowForUpdate struct {
ProcessExecutionId uuid.UUID
// See the top of the file for why we need this field
ProcessExecutionIdString string
StateId string
StateIdSequence int32
Status data_models.StateExecutionStatus
WaitUntilCommands types.JSONText
WaitUntilCommandResults types.JSONText
LastFailure types.JSONText
PreviousVersion int32 // for conditional check
}
type AsyncStateExecutionRowForUpdateWithoutCommands ¶
type AsyncStateExecutionRowForUpdateWithoutCommands struct {
ProcessExecutionId uuid.UUID
// See the top of the file for why we need this field
ProcessExecutionIdString string
StateId string
StateIdSequence int32
Status data_models.StateExecutionStatus
LastFailure types.JSONText
PreviousVersion int32 // for conditional check
}
type ErrorChecker ¶
type ExecutionVisibilityRow ¶
type ImmediateTaskRow ¶
type ImmediateTaskRowDeleteFilter ¶
type ImmediateTaskRowDeleteFilter struct {
ShardId int32
TaskSequence int64
OptionalPartitionKey *data_models.PartitionKey
}
type ImmediateTaskRowForInsert ¶
type ImmediateTaskRowForInsert struct {
ShardId int32
TaskType data_models.ImmediateTaskType
ProcessExecutionId uuid.UUID
// See the top of the file for why we need this field
ProcessExecutionIdString string
// StateId and StateIdSequence will be "" and 0 when TaskType is persistence.ImmediateTaskTypeNewLocalQueueMessages
StateId string
StateIdSequence int32
Info types.JSONText
}
type LocalAttributeRow ¶
type LocalQueueMessageRow ¶
type ProcessExecutionRow ¶
type ProcessExecutionRow struct {
ProcessExecutionId uuid.UUID
// See the top of the file for why we need this field
ProcessExecutionIdString string
ShardId int32
Status data_models.ProcessExecutionStatus
HistoryEventIdSequence int32
StateExecutionSequenceMaps types.JSONText
StateExecutionLocalQueues types.JSONText
Namespace string
ProcessId string
StartTime time.Time
TimeoutSeconds int32
Info types.JSONText
GracefulCompleteRequested bool
}
type ProcessExecutionRowForUpdate ¶
type ProcessExecutionRowForUpdate struct {
ProcessExecutionId uuid.UUID
// See the top of the file for why we need this field
ProcessExecutionIdString string
ShardId int32
Status data_models.ProcessExecutionStatus
HistoryEventIdSequence int32
StateExecutionSequenceMaps types.JSONText
StateExecutionLocalQueues types.JSONText
GracefulCompleteRequested bool
}
type SQLAdminDBSession ¶
type SQLAdminDBSession interface {
CreateDatabase(ctx context.Context, database string) error
DropDatabase(ctx context.Context, database string) error
ExecuteSchemaDDL(ctx context.Context, ddlQuery string) error
Close() error
}
func NewSQLAdminSession ¶
func NewSQLAdminSession(cfg *config.SQL) (SQLAdminDBSession, error)
NewSQLAdminSession returns a AdminDB
type SQLDBExtension ¶
type SQLDBExtension interface {
// StartDBSession starts the session for regular business logic
StartDBSession(cfg *config.SQL) (SQLDBSession, error)
// StartAdminDBSession starts the session for admin operation like DDL
StartAdminDBSession(cfg *config.SQL) (SQLAdminDBSession, error)
}
type SQLDBSession ¶
type SQLDBSession interface {
ErrorChecker
StartTransaction(ctx context.Context, opts *sql.TxOptions) (SQLTransaction, error)
Close() error
// contains filtered or unexported methods
}
func NewSQLSession ¶
func NewSQLSession(cfg *config.SQL) (SQLDBSession, error)
NewSQLSession returns a regular session
type SQLTransaction ¶
type TimerTaskRow ¶
type TimerTaskRowDeleteFilter ¶
type TimerTaskRowDeleteFilter struct {
ShardId int32
FireTimeUnixSeconds int64
TaskSequence int64
OptionalPartitionKey *data_models.PartitionKey
}
type TimerTaskRowForInsert ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.