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.
Index ¶
- func NewEngineDB(sourceCfg config.OracleConfig, targetCfg config.MySQLConfig, ...) (*service.Engine, error)
- func NewMySQLEngineGeneralDB(mysqlCfg config.MySQLConfig, slowQueryThreshold, mysqlMaxOpenConn int) (*service.Engine, error)
- func NewMySQLEnginePrepareDB(mysqlCfg config.MySQLConfig, slowQueryThreshold, mysqlMaxOpenConn int) (*service.Engine, error)
- func NewOracleDBEngine(oraCfg config.OracleConfig) (*sql.DB, error)
- func Run(cfg *config.CfgFile, mode, reverse string) error
- type Postgres
- func (p *Postgres) GetSchemaMeta() (schemaMeta []string)
- func (p *Postgres) GetTableColumnMeta(schemaName string, tableName string) (colMeta []map[string]string)
- func (p *Postgres) GetTableForeignKey(schemaName string, tableName string) (fkList []map[string]string)
- func (p *Postgres) GetTableIndexMeta(schemaName string, tableName string) (idxMeta []map[string]string)
- func (p *Postgres) GetTableMeta(schemaName string) (tableMeta []map[string]string)
- func (p *Postgres) GetTablePrimaryKey(schemaName string, tableName string) (pkList []map[string]string)
- func (p *Postgres) GetTableUniqueKey(schemaName string, tableName string) (ukList []map[string]string)
- func (p *Postgres) GetViewMeta(schemaName, viewName string) (viewMeta []map[string]string)
- func (p *Postgres) QuerySQL(querySQL string) (cols []string, res []map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEngineDB ¶
func NewEngineDB(sourceCfg config.OracleConfig, targetCfg config.MySQLConfig, slowlogThreshold, mysqlMaxOpenConn int) (*service.Engine, error)
数据库引擎初始化
func NewMySQLEngineGeneralDB ¶
func NewMySQLEnginePrepareDB ¶
func NewMySQLEnginePrepareDB(mysqlCfg config.MySQLConfig, slowQueryThreshold, mysqlMaxOpenConn int) (*service.Engine, error)
创建 mysql 数据库引擎
func NewOracleDBEngine ¶
func NewOracleDBEngine(oraCfg config.OracleConfig) (*sql.DB, error)
创建 oracle 数据库引擎