exec

package
v0.0.0-...-e946c5d Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDataResourceManager

func InitDataResourceManager()

Types

type DB

type DB struct {
	*sql.DB

	ResourceGroupId string
	// contains filtered or unexported fields
}

func NewDB

func NewDB(conf config.ATConfig) (*DB, error)

func (*DB) Begin

func (db *DB) Begin(ctx *context.RootContext) (*Tx, error)

func (*DB) GetBranchType

func (db *DB) GetBranchType() meta.BranchType

func (*DB) GetResourceGroupId

func (db *DB) GetResourceGroupId() string

func (*DB) GetResourceId

func (db *DB) GetResourceId() string

type DataSourceManager

type DataSourceManager struct {
	rm.AbstractResourceManager
}

func (DataSourceManager) BranchCommit

func (resourceManager DataSourceManager) BranchCommit(branchType meta.BranchType, xid string, branchId int64,
	resourceId string, applicationData []byte) (meta.BranchStatus, error)

func (DataSourceManager) BranchRollback

func (resourceManager DataSourceManager) BranchRollback(branchType meta.BranchType, xid string, branchId int64,
	resourceId string, applicationData []byte) (meta.BranchStatus, error)

func (DataSourceManager) GetBranchType

func (resourceManager DataSourceManager) GetBranchType() meta.BranchType

func (DataSourceManager) LockQuery

func (resourceManager DataSourceManager) LockQuery(branchType meta.BranchType, resourceId string, xid string,
	lockKeys string) (bool, error)

type DeleteExecutor

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

func (*DeleteExecutor) AfterImage

func (executor *DeleteExecutor) AfterImage() (*_struct.TableRecords, error)

func (*DeleteExecutor) BeforeImage

func (executor *DeleteExecutor) BeforeImage() (*_struct.TableRecords, error)

func (*DeleteExecutor) Execute

func (executor *DeleteExecutor) Execute() (sql.Result, error)

func (*DeleteExecutor) PrepareUndoLog

func (executor *DeleteExecutor) PrepareUndoLog(beforeImage, afterImage *_struct.TableRecords)

type InsertExecutor

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

func (*InsertExecutor) AfterImage

func (executor *InsertExecutor) AfterImage() (*_struct.TableRecords, error)

func (*InsertExecutor) BeforeImage

func (executor *InsertExecutor) BeforeImage() (*_struct.TableRecords, error)

func (*InsertExecutor) BuildTableRecords

func (executor *InsertExecutor) BuildTableRecords(pkValues []interface{}) (*_struct.TableRecords, error)

func (*InsertExecutor) Execute

func (executor *InsertExecutor) Execute() (sql.Result, error)

func (*InsertExecutor) GetColumnLen

func (executor *InsertExecutor) GetColumnLen() int

func (*InsertExecutor) GetPkIndex

func (executor *InsertExecutor) GetPkIndex() int

func (*InsertExecutor) GetPkValuesByColumn

func (executor *InsertExecutor) GetPkValuesByColumn() []interface{}

func (*InsertExecutor) PrepareUndoLog

func (executor *InsertExecutor) PrepareUndoLog(beforeImage, afterImage *_struct.TableRecords)

type SelectForUpdateExecutor

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

func (*SelectForUpdateExecutor) Execute

func (executor *SelectForUpdateExecutor) Execute() (*sql.Rows, error)

type Tx

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

func (*Tx) Commit

func (tx *Tx) Commit() error

func (*Tx) Exec

func (tx *Tx) Exec(query string, args ...interface{}) (sql.Result, error)

func (*Tx) Query

func (tx *Tx) Query(query string, args ...interface{}) (*sql.Rows, error)

func (*Tx) Rollback

func (tx *Tx) Rollback() error

type UpdateExecutor

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

func (*UpdateExecutor) AfterImage

func (executor *UpdateExecutor) AfterImage(beforeImage *_struct.TableRecords) (*_struct.TableRecords, error)

func (*UpdateExecutor) BeforeImage

func (executor *UpdateExecutor) BeforeImage() (*_struct.TableRecords, error)

func (*UpdateExecutor) Execute

func (executor *UpdateExecutor) Execute() (sql.Result, error)

func (*UpdateExecutor) PrepareUndoLog

func (executor *UpdateExecutor) PrepareUndoLog(beforeImage, afterImage *_struct.TableRecords)

Jump to

Keyboard shortcuts

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