Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Prepare ¶
Prepare prepares the database for capturing changesets. This will setup:
- new `warp_pipe` schema
- new `changesets` table in the `warp_pipe` schema
- new TRIGGER function to be fired AFTER an INSERT, UPDATE, or DELETE on a table
- registers the trigger with all configured tables in the source schema
Types ¶
type Table ¶
func GenerateTablesList ¶
func GenerateTablesList(conn *pgx.Conn, schemas, includeTables, excludeTables []string) ([]Table, error)
GenerateTablesList using the includes and excludes list. If no tables are specified in the includes list, obtain the complete list from Postgres using the supplied schemas. If any of the included tables are listed as excluded, remove them from the list.
type Wal2JSONChange ¶
type Wal2JSONChange struct { ID int64 `json:"id"` Kind string `json:"kind"` Schema string `json:"schema"` Table string `json:"table"` ColumnNames []string `json:"columnnames"` ColumnTypes []string `json:"columntypes"` ColumnValues []interface{} `json:"columnvalues"` OldKeys *Wal2JSONOldKeys `json:"oldkeys"` }
Wal2JSONChange represents a changeset within a Wal2JSONMessage.
type Wal2JSONMessage ¶
type Wal2JSONMessage struct { Changes []*Wal2JSONChange `json:"change"` NextLSN string `json:"nextlsn"` }
Wal2JSONMessage represents a wal2json message object.
type Wal2JSONOldKeys ¶
type Wal2JSONOldKeys struct { KeyNames []string `json:"keynames"` KeyTypes []string `json:"keytypes"` KeyValues []interface{} `json:"keyvalues"` }
Wal2JSONOldKeys represents the `oldkeys` object in a Wal2JSON change
Click to show internal directories.
Click to hide internal directories.