Documentation ¶
Index ¶
- func RunPipelineStmts(conn db.SQLConnector, stmts ...*PipelineStmt) error
- func RunPipelineStmtsWithTransactionx(conn db.SQLConnector, stmts ...*PipelineStmt) error
- func RunPipelines(conn db.SQLConnector, pipelines ...Pipeline) error
- func RunpipelinesWithTransactionx(conn db.SQLConnector, pipelines ...Pipeline) error
- type Pipeline
- type PipelineManager
- type PipelineStmt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunPipelineStmts ¶
func RunPipelineStmts(conn db.SQLConnector, stmts ...*PipelineStmt) error
RunPipelineStmts - Runs a slice of *PipelineStmt
func RunPipelineStmtsWithTransactionx ¶
func RunPipelineStmtsWithTransactionx(conn db.SQLConnector, stmts ...*PipelineStmt) error
RunPipelineStmtsWithTransactionx - Runs a slice of *PipelineStmt under transaction
func RunPipelines ¶
func RunPipelines(conn db.SQLConnector, pipelines ...Pipeline) error
RunPipelines - Takes a slice of Pipeline and execs all them
func RunpipelinesWithTransactionx ¶
func RunpipelinesWithTransactionx(conn db.SQLConnector, pipelines ...Pipeline) error
RunpipelinesWithTransactionx - Takes a slice of Pipeline and execs all them under transaction
Types ¶
type Pipeline ¶
type Pipeline interface {
Exec(conn db.SQLConnector) (sql.Result, error)
}
Pipeline - Defines generics interface to implemtns a pipeline
type PipelineManager ¶
type PipelineManager struct {
// contains filtered or unexported fields
}
PipelineManager - Defines a manager for executing pipeline
func NewPipelineManager ¶
func NewPipelineManager(conn db.SQLConnector) *PipelineManager
NewPipelineManager - Returns a new instance ptr of PipelineManager
func (*PipelineManager) AddPipe ¶
func (pm *PipelineManager) AddPipe(p Pipeline)
AddPipe - Appends the single pipe to the queue
func (*PipelineManager) RunPipelines ¶
func (pm *PipelineManager) RunPipelines() error
RunPipelines - Runs all added Pipeline interfaces
func (*PipelineManager) RunPipelinesWithTransactionx ¶
func (pm *PipelineManager) RunPipelinesWithTransactionx() error
RunPipelinesWithTransactionx - Runs all added Pipeline interfaces under transaction
type PipelineStmt ¶
type PipelineStmt struct {
// contains filtered or unexported fields
}
PipelineStmt - Defines a wrapper for sql stmt
func NewPipelineStmt ¶
func NewPipelineStmt(query string, args ...interface{}) *PipelineStmt
NewPipelineStmt - Returns instance ptr of PipelineStmt
func (*PipelineStmt) Exec ¶
func (ps *PipelineStmt) Exec(conn db.SQLConnector) (sql.Result, error)
Exec - Exec a stmt, necessary to implemnt Pipeline