oracle

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 18 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

This section is empty.

Variables

This section is empty.

Functions

func Query

func Query(ctx context.Context, db *sql.DB, querySQL string) ([]string, []map[string]string, error)

Types

type Oracle

type Oracle struct {
	Ctx      context.Context
	OracleDB *sql.DB
}

func NewOracleDBEngine

func NewOracleDBEngine(ctx context.Context, oraCfg config.OracleConfig, currentSchema string) (*Oracle, error)

创建 oracle 数据库引擎

func NewOracleLogminerEngine added in v1.0.13

func NewOracleLogminerEngine(ctx context.Context, oraCfg config.OracleConfig) (*Oracle, error)

Only Used for ALL Mode

func (*Oracle) AddOracleLogminerlogFile

func (o *Oracle) AddOracleLogminerlogFile(logFile string) error

func (*Oracle) CloseOracleChunkTask

func (o *Oracle) CloseOracleChunkTask(taskName string) error

func (*Oracle) EndOracleLogminerStoredProcedure

func (o *Oracle) EndOracleLogminerStoredProcedure() error

func (*Oracle) GetOracleALLRedoLogFile

func (o *Oracle) GetOracleALLRedoLogFile() ([]string, error)

func (*Oracle) GetOracleArchivedLogFile

func (o *Oracle) GetOracleArchivedLogFile(scn string) ([]map[string]string, error)

func (*Oracle) GetOracleArchivedLogSCN

func (o *Oracle) GetOracleArchivedLogSCN(scn string) (uint64, error)

func (*Oracle) GetOracleCurrentRedoMaxSCN

func (o *Oracle) GetOracleCurrentRedoMaxSCN() (uint64, uint64, string, error)

func (*Oracle) GetOracleCurrentSnapshotSCN

func (o *Oracle) GetOracleCurrentSnapshotSCN() (uint64, error)

func (*Oracle) GetOracleDBCharacterNLSCompCollation

func (o *Oracle) GetOracleDBCharacterNLSCompCollation() (string, error)

func (*Oracle) GetOracleDBCharacterNLSSortCollation

func (o *Oracle) GetOracleDBCharacterNLSSortCollation() (string, error)

func (*Oracle) GetOracleDBCharacterSet

func (o *Oracle) GetOracleDBCharacterSet() (string, error)

func (*Oracle) GetOracleDBName

func (o *Oracle) GetOracleDBName() (string, string, string, error)

func (*Oracle) GetOracleDBVersion

func (o *Oracle) GetOracleDBVersion() (string, error)

func (*Oracle) GetOracleDataRowStrings

func (o *Oracle) GetOracleDataRowStrings(querySQL string) ([]string, *strset.Set, uint32, error)

func (*Oracle) GetOracleDataTotal

func (o *Oracle) GetOracleDataTotal() (string, error)

func (*Oracle) GetOracleExtendedMode

func (o *Oracle) GetOracleExtendedMode() (bool, error)

func (*Oracle) GetOracleGlobalName

func (o *Oracle) GetOracleGlobalName() (string, error)

func (*Oracle) GetOracleInstance

func (o *Oracle) GetOracleInstance() ([]map[string]string, error)

func (*Oracle) GetOracleMaxActiveSessionCount

func (o *Oracle) GetOracleMaxActiveSessionCount() ([]map[string]string, error)

func (*Oracle) GetOracleMemoryGB

func (o *Oracle) GetOracleMemoryGB() (string, error)

func (*Oracle) GetOracleNumCPU

func (o *Oracle) GetOracleNumCPU() (string, error)

func (*Oracle) GetOracleParameters

func (o *Oracle) GetOracleParameters() (string, string, string, string, error)

func (*Oracle) GetOraclePartitionTableINFO

func (o *Oracle) GetOraclePartitionTableINFO(schemaName, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleRedoLogFile

func (o *Oracle) GetOracleRedoLogFile(scn string) ([]map[string]string, error)

func (*Oracle) GetOracleRedoLogSCN

func (o *Oracle) GetOracleRedoLogSCN(scn string) (uint64, error)

func (*Oracle) GetOracleSchemaClusteredTable

func (o *Oracle) GetOracleSchemaClusteredTable(schemaName string) ([]string, error)

func (*Oracle) GetOracleSchemaCodeObject

func (o *Oracle) GetOracleSchemaCodeObject(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaCollation

func (o *Oracle) GetOracleSchemaCollation(schemaName string) (string, error)

func (*Oracle) GetOracleSchemaColumnDataDefaultCounts

func (o *Oracle) GetOracleSchemaColumnDataDefaultCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaColumnTypeCounts

func (o *Oracle) GetOracleSchemaColumnTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaConstraintTypeCounts

func (o *Oracle) GetOracleSchemaConstraintTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaIndexTypeCounts

func (o *Oracle) GetOracleSchemaIndexTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaMaterializedView

func (o *Oracle) GetOracleSchemaMaterializedView(schemaName string) ([]string, error)

func (*Oracle) GetOracleSchemaMaterializedViewObject

func (o *Oracle) GetOracleSchemaMaterializedViewObject(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaObjectTypeCounts

func (o *Oracle) GetOracleSchemaObjectTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaOverview

func (o *Oracle) GetOracleSchemaOverview(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaPartitionObjectType

func (o *Oracle) GetOracleSchemaPartitionObjectType(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaPartitionTable

func (o *Oracle) GetOracleSchemaPartitionTable(schemaName string) ([]string, error)

func (*Oracle) GetOracleSchemaPartitionTableCountsOver1024

func (o *Oracle) GetOracleSchemaPartitionTableCountsOver1024(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaPartitionTypeCounts

func (o *Oracle) GetOracleSchemaPartitionTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaSubPartitionTypeCounts

func (o *Oracle) GetOracleSchemaSubPartitionTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaSynonymObject

func (o *Oracle) GetOracleSchemaSynonymObject(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTable

func (o *Oracle) GetOracleSchemaTable(schemaName string) ([]string, error)

func (*Oracle) GetOracleSchemaTableAvgRowLengthTOP

func (o *Oracle) GetOracleSchemaTableAvgRowLengthTOP(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableCheckKey

func (o *Oracle) GetOracleSchemaTableCheckKey(schemaName string, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableCollation

func (o *Oracle) GetOracleSchemaTableCollation(schemaName, schemaCollation string) (map[string]string, error)

func (*Oracle) GetOracleSchemaTableColumn

func (o *Oracle) GetOracleSchemaTableColumn(schemaName string, tableName string, oraCollation bool) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableColumnComment

func (o *Oracle) GetOracleSchemaTableColumnComment(schemaName string, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableColumnCountsOver512

func (o *Oracle) GetOracleSchemaTableColumnCountsOver512(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableColumnNameLengthOver64

func (o *Oracle) GetOracleSchemaTableColumnNameLengthOver64(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableComment

func (o *Oracle) GetOracleSchemaTableComment(schemaName string, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableForeignKey

func (o *Oracle) GetOracleSchemaTableForeignKey(schemaName string, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableIndexCountsOver64

func (o *Oracle) GetOracleSchemaTableIndexCountsOver64(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableIndexLengthOver3072

func (o *Oracle) GetOracleSchemaTableIndexLengthOver3072(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableIndexNameLengthOver64

func (o *Oracle) GetOracleSchemaTableIndexNameLengthOver64(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableNameLengthOver64

func (o *Oracle) GetOracleSchemaTableNameLengthOver64(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableNormalIndex

func (o *Oracle) GetOracleSchemaTableNormalIndex(schemaName string, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableNumberTypeEqual0

func (o *Oracle) GetOracleSchemaTableNumberTypeEqual0(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTablePrimaryKey

func (o *Oracle) GetOracleSchemaTablePrimaryKey(schemaName string, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableRowLengthOver6M

func (o *Oracle) GetOracleSchemaTableRowLengthOver6M(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableRowsTOP

func (o *Oracle) GetOracleSchemaTableRowsTOP(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableSequenceNameLengthOver64

func (o *Oracle) GetOracleSchemaTableSequenceNameLengthOver64(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableType

func (o *Oracle) GetOracleSchemaTableType(schemaName string) (map[string]string, error)

func (*Oracle) GetOracleSchemaTableTypeCounts

func (o *Oracle) GetOracleSchemaTableTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableUniqueIndex

func (o *Oracle) GetOracleSchemaTableUniqueIndex(schemaName string, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableUniqueKey

func (o *Oracle) GetOracleSchemaTableUniqueKey(schemaName string, tableName string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTableViewNameLengthOver64

func (o *Oracle) GetOracleSchemaTableViewNameLengthOver64(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaTemporaryTable

func (o *Oracle) GetOracleSchemaTemporaryTable(schemaName string) ([]string, error)

func (*Oracle) GetOracleSchemaTemporaryTableTypeCounts

func (o *Oracle) GetOracleSchemaTemporaryTableTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemaViewTypeCounts

func (o *Oracle) GetOracleSchemaViewTypeCounts(schemaName []string) ([]map[string]string, error)

func (*Oracle) GetOracleSchemas

func (o *Oracle) GetOracleSchemas() ([]string, error)

func (*Oracle) GetOracleSoftVersion added in v1.0.14

func (o *Oracle) GetOracleSoftVersion() (string, error)

func (*Oracle) GetOracleTableActualRows

func (o *Oracle) GetOracleTableActualRows(oraQuery string) (int64, error)

func (*Oracle) GetOracleTableChunksByNUMBER

func (o *Oracle) GetOracleTableChunksByNUMBER(taskName, numberColName string) ([]map[string]string, error)

func (*Oracle) GetOracleTableChunksByRowID

func (o *Oracle) GetOracleTableChunksByRowID(taskName string) ([]map[string]string, error)

func (*Oracle) GetOracleTableColumnDistinctValue

func (o *Oracle) GetOracleTableColumnDistinctValue(schemaName, tableName string, columnList []string) ([]string, error)

func (*Oracle) GetOracleTableOriginDDL added in v1.0.13

func (o *Oracle) GetOracleTableOriginDDL(schemaName, tableName, tableType string) (string, error)

func (*Oracle) GetOracleTableRowsByStatistics

func (o *Oracle) GetOracleTableRowsByStatistics(schemaName, tableName string) (int, error)

func (*Oracle) GetOracleTableRowsColumn added in v1.0.13

func (o *Oracle) GetOracleTableRowsColumn(querySQL string, sourceDBCharset, targetDBCharset string) ([]string, error)

获取表字段名以及行数据 -> 用于 FULL/ALL

func (*Oracle) GetOracleTableRowsColumnCSV added in v1.0.13

func (o *Oracle) GetOracleTableRowsColumnCSV(querySQL string, sourceDBCharset, targetDBCharset string) ([]string, error)

获取表字段以及行数据 -> 用于 CSV

func (*Oracle) GetOracleTableRowsData

func (o *Oracle) GetOracleTableRowsData(querySQL string, insertBatchSize, callTimeout int, sourceDBCharset, targetDBCharset string, dataChan chan []map[string]interface{}) error

func (*Oracle) GetOracleTableRowsDataCSV added in v1.0.13

func (o *Oracle) GetOracleTableRowsDataCSV(querySQL, sourceDBCharset, targetDBCharset string, cfg *config.Config, dataChan chan [][]string, tableColumnNames []string) error

func (*Oracle) GetOracleUsernameLengthOver64

func (o *Oracle) GetOracleUsernameLengthOver64(schemaName []string) ([]map[string]string, error)

func (*Oracle) IsNumberColumnTYPE

func (o *Oracle) IsNumberColumnTYPE(schemaName, tableName, indexFiledName string) (bool, error)

func (*Oracle) IsOraclePartitionTable

func (o *Oracle) IsOraclePartitionTable(schemaName, tableName string) (bool, error)

func (*Oracle) StartOracleChunkCreateTask

func (o *Oracle) StartOracleChunkCreateTask(taskName string) error

func (*Oracle) StartOracleCreateChunkByNUMBER

func (o *Oracle) StartOracleCreateChunkByNUMBER(taskName, schemaName, tableName, numberColName string, chunkSize string) error

func (*Oracle) StartOracleCreateChunkByRowID

func (o *Oracle) StartOracleCreateChunkByRowID(taskName, schemaName, tableName string, chunkSize string, callTimeout int) error

func (*Oracle) StartOracleLogminerStoredProcedure

func (o *Oracle) StartOracleLogminerStoredProcedure(scn string) error

func (*Oracle) WriteOracleTable added in v1.0.10

func (o *Oracle) WriteOracleTable(sql string) error

Jump to

Keyboard shortcuts

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