MCPcopy Create free account
hub / github.com/actiontech/dtle / findSchemaConfig

Method findSchemaConfig

driver/oracle/extractor/log_miner.go:1290–1310  ·  view source on GitHub ↗
(schemaName string)

Source from the content-addressed store, hash-verified

1288}
1289
1290func (e *ExtractorOracle) findSchemaConfig(schemaName string) *common.DataSource {
1291 if schemaName == "" {
1292 return nil
1293 }
1294 for i := range e.replicateDoDb {
1295 if e.replicateDoDb[i].TableSchema == schemaName {
1296 return e.replicateDoDb[i]
1297 } else if regStr := e.replicateDoDb[i].TableSchemaRegex; regStr != "" {
1298 reg, err := regexp.Compile(regStr)
1299 if nil != err {
1300 continue
1301 }
1302 if reg.MatchString(schemaName) {
1303 return e.replicateDoDb[i]
1304 }
1305 }
1306 }
1307 schemaConfig := &common.DataSource{TableSchema: schemaName}
1308 e.replicateDoDb = append(e.replicateDoDb, schemaConfig)
1309 return schemaConfig
1310}
1311
1312func findTableConfig(schema *common.DataSource, tableName string) *common.Table {
1313 if schema != nil {

Callers 5

TestParseDMLSQLFunction · 0.95
TestParseAlterTableFunction · 0.95
TestParseDropTableFunction · 0.95
parseDMLSQLMethod · 0.95
parseDDLSQLMethod · 0.95

Calls

no outgoing calls

Tested by 3

TestParseDMLSQLFunction · 0.76
TestParseAlterTableFunction · 0.76
TestParseDropTableFunction · 0.76