taskflow

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

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.

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.

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.

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.

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.

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.

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

View Source
const (
	FullSyncMode = "FULL"
	ALLSyncMode  = "ALL"
)

Variables

This section is empty.

Functions

func CreateWorkerPool

func CreateWorkerPool(numOfWorkers int, jobQueue chan IncrPayload, resultQueue chan IncrResult)

func FullSyncOracleTableRecordToMySQL added in v1.0.4

func FullSyncOracleTableRecordToMySQL(cfg *service.CfgFile, engine *service.Engine) error
全量同步任务

全量数据导出导入

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

func GenerateMySQLPrepareBindVarStatement(columns, bindVarBatch int) string

SQL Prepare 语句

func GetIncrResult added in v1.0.4

func GetIncrResult(done chan bool, resultQueue chan IncrResult)

func IncrementSyncOracleTableRecordToMySQL added in v1.0.4

func IncrementSyncOracleTableRecordToMySQL(cfg *service.CfgFile, engine *service.Engine) error

增量同步任务

Types

type IncrPayload added in v1.0.4

type IncrPayload struct {
	GlobalSCN      int             `json:"global_scn"`
	SourceTableSCN int             `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:"-"`
}

func (*IncrPayload) Marshal added in v1.0.4

func (p *IncrPayload) Marshal() string

序列化

func (*IncrPayload) Run added in v1.0.4

func (p *IncrPayload) Run() error

任务同步

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()

type Stmt

type Stmt struct {
	Schema    string
	Table     string
	Columns   []string
	Operation string
	Data      map[string]interface{}
	Before    map[string]interface{}
	WhereExpr string
}

func (*Stmt) Enter

func (v *Stmt) Enter(in ast.Node) (ast.Node, bool)

WARNING: sql parser Format() has be discrepancy ,be is instead of Restore()

func (*Stmt) Leave

func (v *Stmt) Leave(in ast.Node) (ast.Node, bool)

func (*Stmt) Marshal

func (v *Stmt) Marshal() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL