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(cfg *service.CfgFile) (*service.Engine, error)
- func NewMySQLEngineGeneralDB(mysqlCfg service.TargetConfig, slowQueryThreshold int) (*service.Engine, error)
- func NewMySQLEnginePrepareDB(mysqlCfg service.TargetConfig, slowQueryThreshold int) (*service.Engine, error)
- func NewOracleDBEngine(oraCfg service.SourceConfig) (*sql.DB, error)
- func Run(cfg *service.CfgFile, mode 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 NewMySQLEngineGeneralDB ¶
func NewMySQLEnginePrepareDB ¶
func NewMySQLEnginePrepareDB(mysqlCfg service.TargetConfig, slowQueryThreshold int) (*service.Engine, error)
创建 mysql 数据库引擎
func NewOracleDBEngine ¶
func NewOracleDBEngine(oraCfg service.SourceConfig) (*sql.DB, error)
创建 oracle 数据库引擎