Documentation ¶
Overview ¶
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func GetAbsPathOfPGCommand(cmd string) (string, error)
- func GetOracleConnectionString(host string, port int, dbname string, dbsid string, tnsalias string) string
- func IsTableEmpty(db *sql.DB, query string) bool
- type MySQL
- func (ms *MySQL) CheckRequiredToolsAreInstalled()
- func (ms *MySQL) ClearMigrationState(migrationUUID uuid.UUID, exportDir string) error
- func (ms *MySQL) Connect() error
- func (ms *MySQL) Disconnect()
- func (ms *MySQL) ExportData(ctx context.Context, exportDir string, tableList []*sqlname.SourceName, ...)
- func (ms *MySQL) ExportDataPostProcessing(exportDir string, ...)
- func (ms *MySQL) ExportSchema(exportDir string)
- func (ms *MySQL) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName)
- func (ms *MySQL) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName)
- func (ms *MySQL) GetAllSequences() []string
- func (ms *MySQL) GetAllTableNames() []*sqlname.SourceName
- func (ms *MySQL) GetCharset() (string, error)
- func (ms *MySQL) GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string
- func (ms *MySQL) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, _ bool) (map[*sqlname.SourceName][]string, []string)
- func (ms *MySQL) GetIndexesInfo() []utils.IndexInfo
- func (ms *MySQL) GetNonPKTables() ([]string, error)
- func (ms *MySQL) GetPartitions(tableName *sqlname.SourceName) []*sqlname.SourceName
- func (ms *MySQL) GetServers() []string
- func (ms *MySQL) GetTableApproxRowCount(tableName *sqlname.SourceName) int64
- func (ms *MySQL) GetTableColumns(tableName *sqlname.SourceName) ([]string, []string, []string)
- func (ms *MySQL) GetTableRowCount(tableName string) int64
- func (ms *MySQL) GetTableToUniqueKeyColumnsMap(tableList []*sqlname.SourceName) (map[string][]string, error)
- func (ms *MySQL) GetVersion() string
- func (ms *MySQL) ParentTableOfPartition(table *sqlname.SourceName) string
- type Ora2pgConfig
- type Oracle
- func (ora *Oracle) CheckRequiredToolsAreInstalled()
- func (ora *Oracle) ClearMigrationState(migrationUUID uuid.UUID, exportDir string) error
- func (ora *Oracle) Connect() error
- func (ora *Oracle) Disconnect()
- func (ora *Oracle) ExportData(ctx context.Context, exportDir string, tableList []*sqlname.SourceName, ...)
- func (ora *Oracle) ExportDataPostProcessing(exportDir string, ...)
- func (ora *Oracle) ExportSchema(exportDir string)
- func (ora *Oracle) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName)
- func (ora *Oracle) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName)
- func (ora *Oracle) GetAllSequences() []string
- func (ora *Oracle) GetAllTableNames() []*sqlname.SourceName
- func (ora *Oracle) GetCharset() (string, error)
- func (ora *Oracle) GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string
- func (ora *Oracle) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, isStreamingEnabled bool) (map[*sqlname.SourceName][]string, []string)
- func (ora *Oracle) GetIndexesInfo() []utils.IndexInfo
- func (ora *Oracle) GetNonPKTables() ([]string, error)
- func (ora *Oracle) GetPartitions(tableName *sqlname.SourceName) []*sqlname.SourceName
- func (ora *Oracle) GetServers() []string
- func (ora *Oracle) GetTableApproxRowCount(tableName *sqlname.SourceName) int64
- func (ora *Oracle) GetTableColumns(tableName *sqlname.SourceName) ([]string, []string, []string)
- func (ora *Oracle) GetTableRowCount(tableName string) int64
- func (ora *Oracle) GetTableToUniqueKeyColumnsMap(tableList []*sqlname.SourceName) (map[string][]string, error)
- func (ora *Oracle) GetTargetIdentityColumnSequenceName(sequenceName string) string
- func (ora *Oracle) GetVersion() string
- func (ora *Oracle) IsNestedTable(tableName *sqlname.SourceName) bool
- func (ora *Oracle) IsParentOfNestedTable(tableName *sqlname.SourceName) bool
- func (ora *Oracle) ParentTableOfPartition(table *sqlname.SourceName) string
- type PgDumpArgs
- type PostgreSQL
- func (pg *PostgreSQL) CheckRequiredToolsAreInstalled()
- func (pg *PostgreSQL) ClearMigrationState(migrationUUID uuid.UUID, exportDir string) error
- func (pg *PostgreSQL) Connect() error
- func (pg *PostgreSQL) CreateLogicalReplicationSlot(conn *pgconn.PgConn, replicationSlotName string, dropIfAlreadyExists bool) (*pglogrepl.CreateReplicationSlotResult, error)
- func (pg *PostgreSQL) CreatePublication(conn *pgconn.PgConn, publicationName string, tableList []*sqlname.SourceName, ...) error
- func (pg *PostgreSQL) Disconnect()
- func (pg *PostgreSQL) DropLogicalReplicationSlot(conn *pgconn.PgConn, replicationSlotName string) error
- func (pg *PostgreSQL) DropPublication(publicationName string) error
- func (pg *PostgreSQL) ExportData(ctx context.Context, exportDir string, tableList []*sqlname.SourceName, ...)
- func (pg *PostgreSQL) ExportDataPostProcessing(exportDir string, ...)
- func (pg *PostgreSQL) ExportSchema(exportDir string)
- func (pg *PostgreSQL) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName)
- func (pg *PostgreSQL) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName)
- func (pg *PostgreSQL) GetAllSequences() []string
- func (pg *PostgreSQL) GetAllTableNames() []*sqlname.SourceName
- func (pg *PostgreSQL) GetCharset() (string, error)
- func (pg *PostgreSQL) GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string
- func (pg *PostgreSQL) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, _ bool) (map[*sqlname.SourceName][]string, []string)
- func (pg *PostgreSQL) GetIndexesInfo() []utils.IndexInfo
- func (pg *PostgreSQL) GetNonPKTables() ([]string, error)
- func (pg *PostgreSQL) GetPartitions(tableName *sqlname.SourceName) []*sqlname.SourceName
- func (pg *PostgreSQL) GetReplicationConnection() (*pgconn.PgConn, error)
- func (pg *PostgreSQL) GetServers() []string
- func (pg *PostgreSQL) GetTableApproxRowCount(tableName *sqlname.SourceName) int64
- func (pg *PostgreSQL) GetTableColumns(tableName *sqlname.SourceName) ([]string, []string, []string)
- func (pg *PostgreSQL) GetTableRowCount(tableName string) int64
- func (pg *PostgreSQL) GetTableToUniqueKeyColumnsMap(tableList []*sqlname.SourceName) (map[string][]string, error)
- func (pg *PostgreSQL) GetVersion() string
- func (pg *PostgreSQL) ParentTableOfPartition(table *sqlname.SourceName) string
- type Source
- type SourceDB
- type YugabyteDB
- func (yb *YugabyteDB) CheckRequiredToolsAreInstalled()
- func (yb *YugabyteDB) ClearMigrationState(migrationUUID uuid.UUID, exportDir string) error
- func (yb *YugabyteDB) Connect() error
- func (yb *YugabyteDB) Disconnect()
- func (yb *YugabyteDB) ExportData(ctx context.Context, exportDir string, tableList []*sqlname.SourceName, ...)
- func (yb *YugabyteDB) ExportDataPostProcessing(exportDir string, ...)
- func (yb *YugabyteDB) ExportSchema(exportDir string)
- func (yb *YugabyteDB) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName)
- func (yb *YugabyteDB) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName)
- func (yb *YugabyteDB) GetAllSequences() []string
- func (yb *YugabyteDB) GetAllTableNames() []*sqlname.SourceName
- func (yb *YugabyteDB) GetCharset() (string, error)
- func (yb *YugabyteDB) GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string
- func (yb *YugabyteDB) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, _ bool) (map[*sqlname.SourceName][]string, []string)
- func (yb *YugabyteDB) GetIndexesInfo() []utils.IndexInfo
- func (yb *YugabyteDB) GetNonPKTables() ([]string, error)
- func (yb *YugabyteDB) GetPartitions(tableName *sqlname.SourceName) []*sqlname.SourceName
- func (yb *YugabyteDB) GetServers() []string
- func (yb *YugabyteDB) GetTableApproxRowCount(tableName *sqlname.SourceName) int64
- func (yb *YugabyteDB) GetTableColumns(tableName *sqlname.SourceName) ([]string, []string, []string)
- func (yb *YugabyteDB) GetTableRowCount(tableName string) int64
- func (yb *YugabyteDB) GetTableToUniqueKeyColumnsMap(tableList []*sqlname.SourceName) (map[string][]string, error)
- func (yb *YugabyteDB) GetVersion() string
- func (yb *YugabyteDB) ParentTableOfPartition(table *sqlname.SourceName) string
Constants ¶
const FETCH_COLUMN_SEQUENCES_QUERY_TEMPLATE = `` /* 622-byte string literal not displayed */
const PG_COMMAND_VERSION string = "14.0"
Variables ¶
var Ora2pgConfigFile string
var PG_QUERY_TO_CHECK_IF_TABLE_HAS_PK = `` /* 278-byte string literal not displayed */
Functions ¶
func GetAbsPathOfPGCommand ¶ added in v0.81.0
Given a PG command name ("pg_dump", "pg_restore"), find absolute path of the executable file having version >= `PG_COMMAND_VERSION`.
func GetOracleConnectionString ¶ added in v1.5.0
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func (*MySQL) CheckRequiredToolsAreInstalled ¶
func (ms *MySQL) CheckRequiredToolsAreInstalled()
func (*MySQL) ClearMigrationState ¶ added in v1.6.0
func (*MySQL) Disconnect ¶ added in v1.4.0
func (ms *MySQL) Disconnect()
func (*MySQL) ExportData ¶
func (*MySQL) ExportDataPostProcessing ¶
func (ms *MySQL) ExportDataPostProcessing(exportDir string, tablesProgressMetadata map[string]*utils.TableProgressMetadata)
func (*MySQL) ExportSchema ¶
func (*MySQL) FilterEmptyTables ¶ added in v1.3.0
func (ms *MySQL) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName)
func (*MySQL) FilterUnsupportedTables ¶ added in v0.83.0
func (ms *MySQL) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName)
func (*MySQL) GetAllSequences ¶ added in v1.4.0
func (*MySQL) GetAllTableNames ¶
func (ms *MySQL) GetAllTableNames() []*sqlname.SourceName
func (*MySQL) GetCharset ¶ added in v0.81.0
func (*MySQL) GetColumnToSequenceMap ¶ added in v1.3.0
func (ms *MySQL) GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string
Only valid case is when the table has a auto increment column Note: a mysql table can have only one auto increment column
func (*MySQL) GetColumnsWithSupportedTypes ¶ added in v1.3.0
func (ms *MySQL) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, _ bool) (map[*sqlname.SourceName][]string, []string)
func (*MySQL) GetIndexesInfo ¶ added in v1.6.0
func (*MySQL) GetNonPKTables ¶ added in v1.6.5
func (*MySQL) GetPartitions ¶ added in v1.6.0
func (ms *MySQL) GetPartitions(tableName *sqlname.SourceName) []*sqlname.SourceName
func (*MySQL) GetServers ¶ added in v1.5.0
func (*MySQL) GetTableApproxRowCount ¶
func (ms *MySQL) GetTableApproxRowCount(tableName *sqlname.SourceName) int64
func (*MySQL) GetTableColumns ¶ added in v1.3.0
func (*MySQL) GetTableRowCount ¶
func (*MySQL) GetTableToUniqueKeyColumnsMap ¶ added in v1.6.5
func (*MySQL) GetVersion ¶
func (*MySQL) ParentTableOfPartition ¶ added in v1.6.0
func (ms *MySQL) ParentTableOfPartition(table *sqlname.SourceName) string
type Ora2pgConfig ¶ added in v1.1.0
type Oracle ¶
type Oracle struct {
// contains filtered or unexported fields
}
func (*Oracle) CheckRequiredToolsAreInstalled ¶
func (ora *Oracle) CheckRequiredToolsAreInstalled()
func (*Oracle) ClearMigrationState ¶ added in v1.6.0
func (*Oracle) Disconnect ¶ added in v1.4.0
func (ora *Oracle) Disconnect()
func (*Oracle) ExportData ¶
func (*Oracle) ExportDataPostProcessing ¶
func (ora *Oracle) ExportDataPostProcessing(exportDir string, tablesProgressMetadata map[string]*utils.TableProgressMetadata)
func (*Oracle) ExportSchema ¶
func (*Oracle) FilterEmptyTables ¶ added in v1.3.0
func (ora *Oracle) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName)
func (*Oracle) FilterUnsupportedTables ¶ added in v0.83.0
func (ora *Oracle) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName)
func (*Oracle) GetAllSequences ¶ added in v1.4.0
func (*Oracle) GetAllTableNames ¶
func (ora *Oracle) GetAllTableNames() []*sqlname.SourceName
func (*Oracle) GetCharset ¶ added in v0.81.0
func (*Oracle) GetColumnToSequenceMap ¶ added in v1.3.0
func (ora *Oracle) GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string
GetColumnToSequenceMap returns a map of column name to sequence name for all identity columns in the given list of tables. Note: There can be only one identity column per table in Oracle
func (*Oracle) GetColumnsWithSupportedTypes ¶ added in v1.3.0
func (ora *Oracle) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, isStreamingEnabled bool) (map[*sqlname.SourceName][]string, []string)
func (*Oracle) GetIndexesInfo ¶ added in v1.6.0
return list of jsons having index info like index name, index type, table name, column name
func (*Oracle) GetNonPKTables ¶ added in v1.6.5
func (*Oracle) GetPartitions ¶ added in v1.6.0
func (ora *Oracle) GetPartitions(tableName *sqlname.SourceName) []*sqlname.SourceName
func (*Oracle) GetServers ¶ added in v1.5.0
func (*Oracle) GetTableApproxRowCount ¶
func (ora *Oracle) GetTableApproxRowCount(tableName *sqlname.SourceName) int64
func (*Oracle) GetTableColumns ¶ added in v1.3.0
func (*Oracle) GetTableRowCount ¶
func (*Oracle) GetTableToUniqueKeyColumnsMap ¶ added in v1.6.5
func (*Oracle) GetTargetIdentityColumnSequenceName ¶ added in v0.83.0
func (*Oracle) GetVersion ¶
func (*Oracle) IsNestedTable ¶ added in v1.3.0
func (ora *Oracle) IsNestedTable(tableName *sqlname.SourceName) bool
func (*Oracle) IsParentOfNestedTable ¶ added in v1.3.0
func (ora *Oracle) IsParentOfNestedTable(tableName *sqlname.SourceName) bool
func (*Oracle) ParentTableOfPartition ¶ added in v1.6.0
func (ora *Oracle) ParentTableOfPartition(table *sqlname.SourceName) string
type PgDumpArgs ¶ added in v1.5.0
type PgDumpArgs struct { Schema string SchemaTempFilePath string ExtensionPattern string TablesListPattern string DataDirPath string DataFormat string ParallelJobs string NoComments string // default values from template file will be taken SchemaOnly string NoOwner string NoPrivileges string NoTablespaces string LoadViaPartitionRoot string DataOnly string NoBlobs string }
type PostgreSQL ¶
type PostgreSQL struct {
// contains filtered or unexported fields
}
func (*PostgreSQL) CheckRequiredToolsAreInstalled ¶
func (pg *PostgreSQL) CheckRequiredToolsAreInstalled()
func (*PostgreSQL) ClearMigrationState ¶ added in v1.6.0
func (pg *PostgreSQL) ClearMigrationState(migrationUUID uuid.UUID, exportDir string) error
func (*PostgreSQL) Connect ¶
func (pg *PostgreSQL) Connect() error
func (*PostgreSQL) CreateLogicalReplicationSlot ¶ added in v1.6.2
func (pg *PostgreSQL) CreateLogicalReplicationSlot(conn *pgconn.PgConn, replicationSlotName string, dropIfAlreadyExists bool) (*pglogrepl.CreateReplicationSlotResult, error)
func (*PostgreSQL) CreatePublication ¶ added in v1.6.5
func (pg *PostgreSQL) CreatePublication(conn *pgconn.PgConn, publicationName string, tableList []*sqlname.SourceName, dropIfAlreadyExists bool) error
func (*PostgreSQL) Disconnect ¶ added in v1.4.0
func (pg *PostgreSQL) Disconnect()
func (*PostgreSQL) DropLogicalReplicationSlot ¶ added in v1.6.5
func (pg *PostgreSQL) DropLogicalReplicationSlot(conn *pgconn.PgConn, replicationSlotName string) error
func (*PostgreSQL) DropPublication ¶ added in v1.6.5
func (pg *PostgreSQL) DropPublication(publicationName string) error
func (*PostgreSQL) ExportData ¶
func (pg *PostgreSQL) ExportData(ctx context.Context, exportDir string, tableList []*sqlname.SourceName, quitChan chan bool, exportDataStart, exportSuccessChan chan bool, tablesColumnList map[*sqlname.SourceName][]string, snapshotName string)
func (*PostgreSQL) ExportDataPostProcessing ¶
func (pg *PostgreSQL) ExportDataPostProcessing(exportDir string, tablesProgressMetadata map[string]*utils.TableProgressMetadata)
func (*PostgreSQL) ExportSchema ¶
func (pg *PostgreSQL) ExportSchema(exportDir string)
func (*PostgreSQL) FilterEmptyTables ¶ added in v1.3.0
func (pg *PostgreSQL) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName)
func (*PostgreSQL) FilterUnsupportedTables ¶ added in v0.83.0
func (pg *PostgreSQL) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName)
func (*PostgreSQL) GetAllSequences ¶ added in v1.4.0
func (pg *PostgreSQL) GetAllSequences() []string
GetAllSequences returns all the sequence names in the database for the given schema list
func (*PostgreSQL) GetAllTableNames ¶
func (pg *PostgreSQL) GetAllTableNames() []*sqlname.SourceName
func (*PostgreSQL) GetCharset ¶ added in v0.81.0
func (pg *PostgreSQL) GetCharset() (string, error)
func (*PostgreSQL) GetColumnToSequenceMap ¶ added in v1.3.0
func (pg *PostgreSQL) GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string
func (*PostgreSQL) GetColumnsWithSupportedTypes ¶ added in v1.3.0
func (pg *PostgreSQL) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, _ bool) (map[*sqlname.SourceName][]string, []string)
func (*PostgreSQL) GetIndexesInfo ¶ added in v1.6.0
func (pg *PostgreSQL) GetIndexesInfo() []utils.IndexInfo
func (*PostgreSQL) GetNonPKTables ¶ added in v1.6.5
func (pg *PostgreSQL) GetNonPKTables() ([]string, error)
func (*PostgreSQL) GetPartitions ¶ added in v1.6.0
func (pg *PostgreSQL) GetPartitions(tableName *sqlname.SourceName) []*sqlname.SourceName
func (*PostgreSQL) GetReplicationConnection ¶ added in v1.6.2
func (pg *PostgreSQL) GetReplicationConnection() (*pgconn.PgConn, error)
func (*PostgreSQL) GetServers ¶ added in v1.5.0
func (pg *PostgreSQL) GetServers() []string
func (*PostgreSQL) GetTableApproxRowCount ¶
func (pg *PostgreSQL) GetTableApproxRowCount(tableName *sqlname.SourceName) int64
func (*PostgreSQL) GetTableColumns ¶ added in v1.3.0
func (pg *PostgreSQL) GetTableColumns(tableName *sqlname.SourceName) ([]string, []string, []string)
func (*PostgreSQL) GetTableRowCount ¶
func (pg *PostgreSQL) GetTableRowCount(tableName string) int64
func (*PostgreSQL) GetTableToUniqueKeyColumnsMap ¶ added in v1.6.5
func (pg *PostgreSQL) GetTableToUniqueKeyColumnsMap(tableList []*sqlname.SourceName) (map[string][]string, error)
func (*PostgreSQL) GetVersion ¶
func (pg *PostgreSQL) GetVersion() string
func (*PostgreSQL) ParentTableOfPartition ¶ added in v1.6.0
func (pg *PostgreSQL) ParentTableOfPartition(table *sqlname.SourceName) string
type Source ¶
type Source struct { DBType string `json:"db_type"` Host string `json:"host"` Port int `json:"port"` User string `json:"user"` Password string `json:"password"` DBName string `json:"db_name"` CDBName string `json:"cdb_name"` DBSid string `json:"db_sid"` CDBSid string `json:"cdb_sid"` OracleHome string `json:"oracle_home"` TNSAlias string `json:"tns_alias"` CDBTNSAlias string `json:"cdb_tns_alias"` Schema string `json:"schema"` SSLMode string `json:"ssl_mode"` SSLCertPath string `json:"ssl_cert_path"` SSLKey string `json:"ssl_key"` SSLRootCert string `json:"ssl_root_cert"` SSLCRL string `json:"ssl_crl"` SSLQueryString string `json:"ssl_query_string"` SSLKeyStore string `json:"ssl_keystore"` SSLKeyStorePassword string `json:"ssl_keystore_password"` SSLTrustStore string `json:"ssl_truststore"` SSLTrustStorePassword string `json:"ssl_truststore_password"` Uri string `json:"uri"` NumConnections int `json:"num_connections"` TableList string `json:"table_list"` ExcludeTableList string `json:"exclude_table_list"` UseOrafce utils.BoolStr `json:"use_orafce"` CommentsOnObjects utils.BoolStr `json:"comments_on_objects"` DBVersion string `json:"db_version"` StrExportObjectTypeList string `json:"str_export_object_type_list"` StrExcludeObjectTypeList string `json:"str_exclude_object_type_list"` ExportObjectTypeList []string `json:"-"` // contains filtered or unexported fields }
func (*Source) ApplyExportSchemaObjectListFilter ¶ added in v1.6.0
func (s *Source) ApplyExportSchemaObjectListFilter()
func (*Source) GetOracleHome ¶ added in v1.4.0
func (*Source) IsOracleCDBSetup ¶ added in v1.5.0
type SourceDB ¶
type SourceDB interface { Connect() error Disconnect() GetTableRowCount(tableName string) int64 GetTableApproxRowCount(tableName *sqlname.SourceName) int64 CheckRequiredToolsAreInstalled() GetVersion() string GetAllTableNames() []*sqlname.SourceName ExportSchema(exportDir string) GetIndexesInfo() []utils.IndexInfo ExportData(ctx context.Context, exportDir string, tableList []*sqlname.SourceName, quitChan chan bool, exportDataStart chan bool, exportSuccessChan chan bool, tablesColumnList map[*sqlname.SourceName][]string, snapshotName string) ExportDataPostProcessing(exportDir string, tablesProgressMetadata map[string]*utils.TableProgressMetadata) GetCharset() (string, error) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, isStreamingEnabled bool) (map[*sqlname.SourceName][]string, []string) GetTableColumns(tableName *sqlname.SourceName) ([]string, []string, []string) ParentTableOfPartition(table *sqlname.SourceName) string GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string GetAllSequences() []string GetServers() []string GetPartitions(table *sqlname.SourceName) []*sqlname.SourceName GetTableToUniqueKeyColumnsMap(tableList []*sqlname.SourceName) (map[string][]string, error) ClearMigrationState(migrationUUID uuid.UUID, exportDir string) error GetNonPKTables() ([]string, error) }
type YugabyteDB ¶ added in v1.5.0
type YugabyteDB struct {
// contains filtered or unexported fields
}
func (*YugabyteDB) CheckRequiredToolsAreInstalled ¶ added in v1.5.0
func (yb *YugabyteDB) CheckRequiredToolsAreInstalled()
func (*YugabyteDB) ClearMigrationState ¶ added in v1.6.0
func (yb *YugabyteDB) ClearMigrationState(migrationUUID uuid.UUID, exportDir string) error
func (*YugabyteDB) Connect ¶ added in v1.5.0
func (yb *YugabyteDB) Connect() error
func (*YugabyteDB) Disconnect ¶ added in v1.5.0
func (yb *YugabyteDB) Disconnect()
func (*YugabyteDB) ExportData ¶ added in v1.5.0
func (yb *YugabyteDB) ExportData(ctx context.Context, exportDir string, tableList []*sqlname.SourceName, quitChan chan bool, exportDataStart, exportSuccessChan chan bool, tablesColumnList map[*sqlname.SourceName][]string, snapshotName string)
func (*YugabyteDB) ExportDataPostProcessing ¶ added in v1.5.0
func (yb *YugabyteDB) ExportDataPostProcessing(exportDir string, tablesProgressMetadata map[string]*utils.TableProgressMetadata)
func (*YugabyteDB) ExportSchema ¶ added in v1.5.0
func (yb *YugabyteDB) ExportSchema(exportDir string)
func (*YugabyteDB) FilterEmptyTables ¶ added in v1.5.0
func (yb *YugabyteDB) FilterEmptyTables(tableList []*sqlname.SourceName) ([]*sqlname.SourceName, []*sqlname.SourceName)
func (*YugabyteDB) FilterUnsupportedTables ¶ added in v1.5.0
func (yb *YugabyteDB) FilterUnsupportedTables(tableList []*sqlname.SourceName, useDebezium bool) ([]*sqlname.SourceName, []*sqlname.SourceName)
func (*YugabyteDB) GetAllSequences ¶ added in v1.5.0
func (yb *YugabyteDB) GetAllSequences() []string
GetAllSequences returns all the sequence names in the database for the given schema list
func (*YugabyteDB) GetAllTableNames ¶ added in v1.5.0
func (yb *YugabyteDB) GetAllTableNames() []*sqlname.SourceName
func (*YugabyteDB) GetCharset ¶ added in v1.5.0
func (yb *YugabyteDB) GetCharset() (string, error)
func (*YugabyteDB) GetColumnToSequenceMap ¶ added in v1.5.0
func (yb *YugabyteDB) GetColumnToSequenceMap(tableList []*sqlname.SourceName) map[string]string
func (*YugabyteDB) GetColumnsWithSupportedTypes ¶ added in v1.5.0
func (yb *YugabyteDB) GetColumnsWithSupportedTypes(tableList []*sqlname.SourceName, useDebezium bool, _ bool) (map[*sqlname.SourceName][]string, []string)
func (*YugabyteDB) GetIndexesInfo ¶ added in v1.6.0
func (yb *YugabyteDB) GetIndexesInfo() []utils.IndexInfo
func (*YugabyteDB) GetNonPKTables ¶ added in v1.6.5
func (yb *YugabyteDB) GetNonPKTables() ([]string, error)
func (*YugabyteDB) GetPartitions ¶ added in v1.6.0
func (yb *YugabyteDB) GetPartitions(tableName *sqlname.SourceName) []*sqlname.SourceName
func (*YugabyteDB) GetServers ¶ added in v1.5.0
func (yb *YugabyteDB) GetServers() []string
func (*YugabyteDB) GetTableApproxRowCount ¶ added in v1.5.0
func (yb *YugabyteDB) GetTableApproxRowCount(tableName *sqlname.SourceName) int64
func (*YugabyteDB) GetTableColumns ¶ added in v1.5.0
func (yb *YugabyteDB) GetTableColumns(tableName *sqlname.SourceName) ([]string, []string, []string)
func (*YugabyteDB) GetTableRowCount ¶ added in v1.5.0
func (yb *YugabyteDB) GetTableRowCount(tableName string) int64
func (*YugabyteDB) GetTableToUniqueKeyColumnsMap ¶ added in v1.6.5
func (yb *YugabyteDB) GetTableToUniqueKeyColumnsMap(tableList []*sqlname.SourceName) (map[string][]string, error)
func (*YugabyteDB) GetVersion ¶ added in v1.5.0
func (yb *YugabyteDB) GetVersion() string
func (*YugabyteDB) ParentTableOfPartition ¶ added in v1.6.0
func (yb *YugabyteDB) ParentTableOfPartition(table *sqlname.SourceName) string