Documentation
¶
Overview ¶
gtid.go
Index ¶
- func CheckGtidSetSubset(db1 *sql.DB, db2 *sql.DB, source string, target string, fix bool, ...) error
- func ConnectToDatabases(sourceHost, sourcePort, targetHost, targetPort string) (db1, db2 *sql.DB, err error)
- func ReadMyCnf() (user, password string, err error)
- type OracleGtidSet
- func (ogs *OracleGtidSet) Explode() (result [](*OracleGtidSetEntry))
- func (ogs *OracleGtidSet) IsEmpty() bool
- func (ogs *OracleGtidSet) RemoveUUID(uuid string) (removed bool)
- func (ogs *OracleGtidSet) RetainUUID(uuid string) (anythingRemoved bool)
- func (ogs *OracleGtidSet) RetainUUIDs(uuids []string) (anythingRemoved bool)
- func (ogs *OracleGtidSet) SharedUUIDs(other *OracleGtidSet) (shared []string)
- func (ogs *OracleGtidSet) String() string
- type OracleGtidSetEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGtidSetSubset ¶
Types ¶
type OracleGtidSet ¶
type OracleGtidSet struct {
GtidEntries [](*OracleGtidSetEntry)
}
OracleGtidSet represents a set of GTID ranges as depicted by Retrieved_Gtid_Set, Executed_Gtid_Set or @@gtid_purged.
func NewOracleGtidSet ¶
func NewOracleGtidSet(gtidSet string) (res *OracleGtidSet, err error)
Example input: `230ea8ea-81e3-11e4-972a-e25ec4bd140a:1-10539, 316d193c-70e5-11e5-adb2-ecf4bb2262ff:1-8935:8984-6124596, 321f5c0d-70e5-11e5-adb2-ecf4bb2262ff:1-56`
func (*OracleGtidSet) Explode ¶
func (ogs *OracleGtidSet) Explode() (result [](*OracleGtidSetEntry))
String returns a user-friendly string representation of this entry
func (*OracleGtidSet) IsEmpty ¶
func (ogs *OracleGtidSet) IsEmpty() bool
func (*OracleGtidSet) RemoveUUID ¶
func (ogs *OracleGtidSet) RemoveUUID(uuid string) (removed bool)
RemoveUUID removes entries that belong to given UUID. By way of how this works there can only be one entry matching our UUID, but we generalize. We keep order of entries.
func (*OracleGtidSet) RetainUUID ¶
func (ogs *OracleGtidSet) RetainUUID(uuid string) (anythingRemoved bool)
RetainUUID retains only entries that belong to given UUID.
func (*OracleGtidSet) RetainUUIDs ¶
func (ogs *OracleGtidSet) RetainUUIDs(uuids []string) (anythingRemoved bool)
RetainUUIDs retains only entries that belong to given UUIDs.
func (*OracleGtidSet) SharedUUIDs ¶
func (ogs *OracleGtidSet) SharedUUIDs(other *OracleGtidSet) (shared []string)
SharedUUIDs returns UUIDs (range-less) that are shared between the two sets
func (*OracleGtidSet) String ¶
func (ogs *OracleGtidSet) String() string
type OracleGtidSetEntry ¶
OracleGtidSetEntry represents an entry in a set of GTID ranges, for example, the entry: "316d193c-70e5-11e5-adb2-ecf4bb2262ff:1-8935:8984-6124596" (may include gaps)
func NewOracleGtidSetEntry ¶
func NewOracleGtidSetEntry(gtidRangeString string) (*OracleGtidSetEntry, error)
NewOracleGtidSetEntry parses a single entry text
func (*OracleGtidSetEntry) Explode ¶
func (oge *OracleGtidSetEntry) Explode() (result [](*OracleGtidSetEntry))
String returns a user-friendly string representation of this entry
func (*OracleGtidSetEntry) String ¶
func (oge *OracleGtidSetEntry) String() string
String returns a user-friendly string representation of this entry