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.
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 ¶
- Constants
- func CreateWorkerPool(numOfWorkers int, jobQueue chan IncrPayload, resultQueue chan IncrResult)
- func FullSyncOracleTableRecordToMySQL(cfg *config.CfgFile, engine *service.Engine) error
- func GenerateMySQLInsertSQLStatementPrefix(targetSchemaName, targetTableName string, columns []string, safeMode bool) string
- func GenerateMySQLPrepareBindVarStatement(columns, bindVarBatch int) string
- func GenerateMySQLTablePrepareStatement(targetSchemaName, targetTableName string, columnFields []string, ...) string
- func GetIncrResult(done chan bool, resultQueue chan IncrResult)
- func IncrementSyncOracleTableRecordToMySQL(cfg *config.CfgFile, engine *service.Engine) error
- type IncrPayload
- type IncrResult
- type LogminerData
- type Stmt
Constants ¶
const ( FullSyncMode = "FULL" ALLSyncMode = "ALL" )
Variables ¶
This section is empty.
Functions ¶
func CreateWorkerPool ¶
func CreateWorkerPool(numOfWorkers int, jobQueue chan IncrPayload, resultQueue chan IncrResult)
func GenerateMySQLInsertSQLStatementPrefix ¶ added in v1.0.4
func GenerateMySQLInsertSQLStatementPrefix(targetSchemaName, targetTableName string, columns []string, safeMode bool) string
SQL Prefix 语句
func GenerateMySQLPrepareBindVarStatement ¶ added in v1.0.4
SQL Prepare 语句
func GenerateMySQLTablePrepareStatement ¶ added in v1.0.5
func GenerateMySQLTablePrepareStatement( targetSchemaName, targetTableName string, columnFields []string, insertBatchSize int, safeMode bool) string
SQL Prepare 语句
func GetIncrResult ¶ added in v1.0.4
func GetIncrResult(done chan bool, resultQueue chan IncrResult)
Types ¶
type IncrPayload ¶ added in v1.0.4
type IncrPayload struct {
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"`
Engine *service.Engine `json:"-"`
}
type IncrResult ¶ added in v1.0.4
type IncrResult struct {
Payload IncrPayload
Status bool
}
type LogminerData ¶
type LogminerData struct {
// contains filtered or unexported fields
}
func NewScheduleJob ¶
func NewScheduleJob(size int, lcMap map[string][]service.LogminerContent, done func()) *LogminerData
func (*LogminerData) AddData ¶
func (s *LogminerData) AddData(v service.LogminerContent)
func (*LogminerData) Close ¶
func (s *LogminerData) Close()
func (*LogminerData) Schedule ¶
func (s *LogminerData) Schedule()