Documentation
¶
Index ¶
- type BatchQuery
- func (m *BatchQuery) Begin()
- func (m *BatchQuery) Commit()
- func (m *BatchQuery) Connect(connectionID string) bool
- func (m *BatchQuery) Discard(PointID string)
- func (m *BatchQuery) Disconnect()
- func (m *BatchQuery) Do(preparedSQL string, args ...interface{}) QueryResult
- func (m *BatchQuery) Get(preparedSQL string, args ...interface{}) QueryResult
- func (m *BatchQuery) LastActionNumber() int
- func (m *BatchQuery) LastErrorText() string
- func (m *BatchQuery) LastQuery() string
- func (m *BatchQuery) LastScopeActionNumber() int
- func (m *BatchQuery) LastScopeName() string
- func (m *BatchQuery) Mark(PointID string)
- func (m *BatchQuery) OK() bool
- func (m *BatchQuery) Rollback()
- func (m *BatchQuery) ScopeName(scopeName string)
- func (m *BatchQuery) Set(preparedSQL string, args ...interface{}) QueryResult
- func (m *BatchQuery) Settings() cfg.Configuration
- func (m *BatchQuery) Waive()
- type DataConfiguration
- type DataQuery
- type Importer
- type QueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchQuery ¶
type BatchQuery struct {
// contains filtered or unexported fields
}
BatchQuery - the BatchQuery struct
func NewBatchQuery ¶
func NewBatchQuery(config *cfg.Configuration) *BatchQuery
NewBatchQuery - create a new BatchQuery object
func (*BatchQuery) Connect ¶
func (m *BatchQuery) Connect(connectionID string) bool
Connect - connect the BatchQuery to the databse
func (*BatchQuery) Discard ¶
func (m *BatchQuery) Discard(PointID string)
Discard - discard the save point data
func (*BatchQuery) Disconnect ¶
func (m *BatchQuery) Disconnect()
Disconnect - disconnect from the dataabse
func (*BatchQuery) Do ¶
func (m *BatchQuery) Do(preparedSQL string, args ...interface{}) QueryResult
Do - execute a stored procedure
func (*BatchQuery) Get ¶
func (m *BatchQuery) Get(preparedSQL string, args ...interface{}) QueryResult
Get - get data from the database
func (*BatchQuery) LastActionNumber ¶
func (m *BatchQuery) LastActionNumber() int
LastActionNumber - returns the last action number
func (*BatchQuery) LastErrorText ¶
func (m *BatchQuery) LastErrorText() string
LastErrorText - returns the last error text
func (*BatchQuery) LastQuery ¶
func (m *BatchQuery) LastQuery() string
LastQuery - returns the last query
func (*BatchQuery) LastScopeActionNumber ¶
func (m *BatchQuery) LastScopeActionNumber() int
LastScopeActionNumber - returns the last scope action number
func (*BatchQuery) LastScopeName ¶
func (m *BatchQuery) LastScopeName() string
LastScopeName - returns the name of the last scope
func (*BatchQuery) Mark ¶
func (m *BatchQuery) Mark(PointID string)
Mark - mark the start of a save point
func (*BatchQuery) ScopeName ¶
func (m *BatchQuery) ScopeName(scopeName string)
ScopeName - name of a function where this query is currently running for debugging purposes. This must be set before any query is executed. The default scope name is 'main'
func (*BatchQuery) Set ¶
func (m *BatchQuery) Set(preparedSQL string, args ...interface{}) QueryResult
Set - set data in the database
func (*BatchQuery) Settings ¶
func (m *BatchQuery) Settings() cfg.Configuration
Settings - returns the internal datahelper settings
func (*BatchQuery) Waive ¶
func (m *BatchQuery) Waive()
Waive - resets the error message back to zero to allow sending query again
type DataConfiguration ¶
type DataConfiguration struct {
DataQuery // DataQuery object
Helper *dh.DataHelper // DataHelper object
}
DataConfiguration - a configuration for import/export
func (*DataConfiguration) SetArgs ¶
func (dc *DataConfiguration) SetArgs(args ...interface{})
SetArgs - set the arguments
type DataQuery ¶
type DataQuery struct {
PreparedQuery string // A prepared SQL query
Args []interface{} // Value arguments
}
DataQuery - a data query set
type Importer ¶
type Importer struct {
ID string // ID of the Importer
Source DataConfiguration // Source data access configuration
Destination DataConfiguration // Destination data access
DestinationCheck DataQuery // A check query before importing data. If set, the importer will utilize this query
Log bool // Log actions
// contains filtered or unexported fields
}
Importer - imports data and store data to the destination
func (*Importer) SetCheckerIndex ¶
SetCheckerIndex - set the checker result index for the DestinationChecker
type QueryResult ¶
QueryResult - the result of the query
func (*QueryResult) First ¶
func (q *QueryResult) First() *dt.Row
First - shortcut to get the first row row