{"modulePath":"github.com/OpsHelmInc/cloudquery/v2","version":"v2.0.0-20250326192610-2631c5f07fe8","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package message\n\n## Types\n\n```go\ntype DeleteRecord struct {\n\tTableName      string\n\tTableRelations TableRelations\n\tWhereClause    PredicateGroups\n\tSyncTime       time.Time\n}\n```\n\n```go\ntype Predicate struct {\n\tOperator string\n\tColumn   string\n\tRecord   arrow.Record\n}\n```\n\n```go\ntype PredicateGroup struct {\n\t// This will be AND or OR\n\tGroupingType string\n\tPredicates   Predicates\n}\n```\n\n```go\ntype PredicateGroups []PredicateGroup\n```\n\n```go\ntype Predicates []Predicate\n```\n\n```go\ntype SyncDeleteRecord struct {\n\n\t// TODO: Instead of using this struct we should derive the DeletionKeys and parent/child relation from the schema.Table itself\n\tDeleteRecord\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (m SyncDeleteRecord) GetTable() *schema.Table\n```\n\n```go\nfunc (*SyncDeleteRecord) IsSyncMessage() bool\n```\n\n```go\ntype SyncInsert struct {\n\tRecord arrow.Record\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (m *SyncInsert) GetTable() *schema.Table\n```\n\n```go\nfunc (*SyncInsert) IsSyncMessage() bool\n```\n\n```go\ntype SyncInserts []*SyncInsert\n```\n\n```go\nfunc (m SyncInserts) Exists(tableName string) bool\n```\n\n```go\nfunc (m SyncInserts) GetRecords() []arrow.Record\n```\n\n```go\nfunc (m SyncInserts) GetRecordsForTable(table *schema.Table) []arrow.Record\n```\nGet all records for a single table\n\n```go\ntype SyncMessage interface {\n\tGetTable() *schema.Table\n\tIsSyncMessage() bool\n}\n```\n\n```go\ntype SyncMessages []SyncMessage\n```\n\n```go\nfunc (messages SyncMessages) GetInserts() SyncInserts\n```\n\n```go\nfunc (messages SyncMessages) InsertItems() int64\n```\n\n```go\ntype SyncMigrateTable struct {\n\tTable *schema.Table\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (m SyncMigrateTable) GetTable() *schema.Table\n```\n\n```go\nfunc (*SyncMigrateTable) IsSyncMessage() bool\n```\n\n```go\ntype SyncMigrateTables []*SyncMigrateTable\n```\n\n```go\nfunc (m SyncMigrateTables) Exists(tableName string) bool\n```\n\n```go\ntype TableRelation struct {\n\tTableName   string\n\tParentTable string\n}\n```\n\n```go\ntype TableRelations []TableRelation\n```\n\n```go\ntype WriteDeleteRecord struct {\n\tDeleteRecord\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (m WriteDeleteRecord) GetTable() *schema.Table\n```\n\n```go\nfunc (*WriteDeleteRecord) IsWriteMessage() bool\n```\n\n```go\ntype WriteDeleteRecords []*WriteDeleteRecord\n```\n\n```go\ntype WriteDeleteStale struct {\n\tTableName  string\n\tSourceName string\n\tSyncTime   time.Time\n\t// contains filtered or unexported fields\n}\n```\nWriteDeleteStale is a pretty specific message which requires the destination to be aware of a CLI use-case thus it might be deprecated in the future in favour of MessageDelete or MessageRawQuery The message indicates that the destination needs to run something like \"DELETE FROM table WHERE \\_cq\\_source\\_name=$1 and sync\\_time \\\u003c $2\"\n\n```go\nfunc (m WriteDeleteStale) GetTable() *schema.Table\n```\n\n```go\nfunc (*WriteDeleteStale) IsWriteMessage() bool\n```\n\n```go\ntype WriteDeleteStales []*WriteDeleteStale\n```\n\n```go\nfunc (m WriteDeleteStales) Exists(tableName string) bool\n```\n\n```go\ntype WriteInsert struct {\n\tRecord arrow.Record\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (m *WriteInsert) GetTable() *schema.Table\n```\n\n```go\nfunc (*WriteInsert) IsWriteMessage() bool\n```\n\n```go\ntype WriteInserts []*WriteInsert\n```\n\n```go\nfunc (m WriteInserts) Exists(tableName string) bool\n```\n\n```go\nfunc (m WriteInserts) GetRecords() []arrow.Record\n```\n\n```go\nfunc (m WriteInserts) GetRecordsForTable(table *schema.Table) []arrow.Record\n```\n\n```go\ntype WriteMessage interface {\n\tGetTable() *schema.Table\n\tIsWriteMessage() bool\n}\n```\n\n```go\ntype WriteMessages []WriteMessage\n```\n\n```go\nfunc (messages WriteMessages) GetInserts() WriteInserts\n```\n\n```go\nfunc (messages WriteMessages) InsertItems() int64\n```\n\n```go\ntype WriteMigrateTable struct {\n\tTable        *schema.Table\n\tMigrateForce bool\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (m WriteMigrateTable) GetTable() *schema.Table\n```\n\n```go\nfunc (*WriteMigrateTable) IsWriteMessage() bool\n```\n\n```go\ntype WriteMigrateTables []*WriteMigrateTable\n```\n\n```go\nfunc (m WriteMigrateTables) Exists(tableName string) bool\n```\n\n```go\nfunc (m WriteMigrateTables) GetMessageByTable(tableName string) *WriteMigrateTable\n```\n\n","path":"github.com/OpsHelmInc/cloudquery/v2/plugin-sdk/message","name":"message","synopsis":"","isRedistributable":true}
