Documentation ¶
Index ¶
- Variables
- type CollectionRecord
- type DBCommand
- type DatabaseInfo
- type MongoDBConnector
- type Writer
- func (writer *Writer) DeleteRecord(reference interface{}, record *gravity_sdk_types_record.Record, ...) 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` InsertTemplate = `INSERT INTO "%s" (%s) VALUES (%s)` DeleteTemplate = `DELETE FROM "%s" WHERE "%s" = :primary_val` )
Functions ¶
This section is empty.
Types ¶
type CollectionRecord ¶
type CollectionRecord struct {
// contains filtered or unexported fields
}
type DBCommand ¶
type DBCommand struct { PipelineID uint64 Sequence uint64 Reference interface{} Record *gravity_sdk_types_record.Record QueryStr string Args map[string]interface{} Tables []string }
func (*DBCommand) GetPipelineID ¶
func (*DBCommand) GetReference ¶
func (cmd *DBCommand) GetReference() interface{}
func (*DBCommand) GetSequence ¶
type DatabaseInfo ¶
type MongoDBConnector ¶
type MongoDBConnector struct {
// contains filtered or unexported fields
}
func NewMongoDBConnector ¶
func NewMongoDBConnector() *MongoDBConnector
func (*MongoDBConnector) Connect ¶
func (mdb *MongoDBConnector) Connect() error
func (*MongoDBConnector) GetClient ¶
func (mdb *MongoDBConnector) GetClient() *mongo.Client
func (*MongoDBConnector) InitializeDatabase ¶
func (mdb *MongoDBConnector) InitializeDatabase() error
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) 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.