Documentation
¶
Index ¶
- Variables
- type ColumnDef
- type DBCommand
- type DatabaseInfo
- type RecordDef
- type Writer
- func (writer *Writer) DeleteRecord(reference interface{}, record *gravity_sdk_types_record.Record, ...) error
- func (writer *Writer) GetDefinition(record *gravity_sdk_types_record.Record) (*gravity_sdk_types_record.RecordDef, error)
- func (writer *Writer) Init() error
- func (writer *Writer) InsertRecord(reference interface{}, record *gravity_sdk_types_record.Record, ...) error
- func (writer *Writer) ProcessData(reference interface{}, record *gravity_sdk_types_record.Record, ...) error
- func (writer *Writer) SetCompletionHandler(fn database.CompletionHandler)
- func (writer *Writer) Truncate(table string) error
- func (writer *Writer) UpdateRecord(reference interface{}, record *gravity_sdk_types_record.Record, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UpdateTemplate = `UPDATE %s SET %s WHERE "%s" = :primary_val` //UpdateTemplate = "UPDATE `%s` SET %s WHERE `%s` = :primary_val" InsertTemplate = `INSERT INTO %s (%s) VALUES (%s)` //InsertTemplate = "INSERT INTO `%s` (%s) VALUES (%s)" DeleteTemplate = `DELETE FROM %s WHERE "%s" = :primary_val` )
Functions ¶
This section is empty.
Types ¶
type DBCommand ¶
type DBCommand struct { PipelineID uint64 Sequence uint64 Reference interface{} Record *gravity_sdk_types_record.Record QueryStr string Args map[string]interface{} RecordDef *gravity_sdk_types_record.RecordDef Tables []string }
func (*DBCommand) GetPipelineID ¶
func (*DBCommand) GetReference ¶
func (cmd *DBCommand) GetReference() interface{}
func (*DBCommand) GetSequence ¶
type DatabaseInfo ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) DeleteRecord ¶
func (writer *Writer) DeleteRecord(reference interface{}, record *gravity_sdk_types_record.Record, tables []string) error
func (*Writer) GetDefinition ¶
func (writer *Writer) GetDefinition(record *gravity_sdk_types_record.Record) (*gravity_sdk_types_record.RecordDef, error)
func (*Writer) InsertRecord ¶
func (writer *Writer) InsertRecord(reference interface{}, record *gravity_sdk_types_record.Record, tables []string) error
func (*Writer) ProcessData ¶
func (writer *Writer) ProcessData(reference interface{}, record *gravity_sdk_types_record.Record, tables []string) error
func (*Writer) SetCompletionHandler ¶
func (writer *Writer) SetCompletionHandler(fn database.CompletionHandler)
func (*Writer) UpdateRecord ¶
func (writer *Writer) UpdateRecord(reference interface{}, record *gravity_sdk_types_record.Record, tables []string) error
Click to show internal directories.
Click to hide internal directories.