Documentation ¶
Overview ¶
Copyright © 2020 Marvin
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 © 2020 Marvin ¶
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 © 2020 Marvin ¶
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 © 2020 Marvin ¶
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 © 2020 Marvin ¶
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 ¶
- func GenMySQLInsertSQLStmtPrefix(targetSchemaName, targetTableName string, columns []string, safeMode bool) string
- func GenMySQLPrepareBindVarStmt(columns, bindVarBatch int) string
- func GenMySQLTablePrepareStmt(targetSchemaName, targetTableName string, columnFields []string, ...) string
- type IncrResult
- type IncrTask
- type Migrate
- func (r *Migrate) AdjustTableSelectColumn(sourceTable string, oracleCollation bool) (string, error)
- func (r *Migrate) Full() error
- func (r *Migrate) FullPartSyncTable(fullPartTables []string) error
- func (r *Migrate) FullWaitSyncTable(fullWaitTables []string, oracleCollation bool) error
- func (r *Migrate) GetCustomMigrateConfig() map[string]config.MigrateConfig
- func (r *Migrate) GetTableNameRule() (map[string]string, error)
- func (r *Migrate) Incr() error
- func (r *Migrate) InitWaitSyncTableChunk(fullWaitTables []string, oracleCollation bool) error
- type Rows
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenMySQLInsertSQLStmtPrefix ¶
func GenMySQLInsertSQLStmtPrefix(targetSchemaName, targetTableName string, columns []string, safeMode bool) string
SQL Prefix 语句
func GenMySQLPrepareBindVarStmt ¶
SQL Prepare 语句
Types ¶
type IncrResult ¶
type IncrTask ¶
type IncrTask struct { Ctx context.Context `json:"-"` DBTypeS string `json:"db_type_s"` DBTypeT string `json:"db_type_t"` TaskMode string `json:"task_mode"` GlobalSCN uint64 `json:"global_scn"` SourceTableSCN uint64 `json:"source_table_scn"` SourceSchema string `json:"source_schema"` SourceTable string `json:"source_table"` TargetSchema string `json:"target_schema"` TargetTable string `json:"target_table"` Operation string `json:"operation"` OracleRedo string `json:"oracle_redo"` // Oracle SQL MySQLRedo []string `json:"mysql_redo"` // MySQL 待执行 SQL OperationType string `json:"operation_type"` MySQL *mysql.MySQL `json:"-"` MetaDB *meta.Meta `json:"-"` }
type Migrate ¶
type Migrate struct { Ctx context.Context Cfg *config.Config Oracle *oracle.Oracle OracleMiner *oracle.Oracle Mysql *mysql.MySQL MetaDB *meta.Meta }
func (*Migrate) AdjustTableSelectColumn ¶
func (*Migrate) FullPartSyncTable ¶
func (*Migrate) FullWaitSyncTable ¶
func (*Migrate) GetCustomMigrateConfig ¶ added in v1.0.17
func (r *Migrate) GetCustomMigrateConfig() map[string]config.MigrateConfig
type Rows ¶
type Rows struct { Ctx context.Context SyncMeta meta.FullSyncMeta Oracle *oracle.Oracle MySQL *mysql.MySQL SourceDBCharset string TargetDBCharset string ApplyThreads int BatchSize int SafeMode bool ColumnNameS []string ReadChannel chan []map[string]string WriteChannel chan string }