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

Function transConstraintOtoM

driver/oracle/extractor/sql_parse.go:407–422  ·  view source on GitHub ↗
(oracleConstraint *oracle_ast.InlineConstraint)

Source from the content-addressed store, hash-verified

405}
406
407func transConstraintOtoM(oracleConstraint *oracle_ast.InlineConstraint) (constraint *ast.ColumnOption) {
408 constraint = new(ast.ColumnOption)
409 switch oracleConstraint.Type {
410 case oracle_ast.ConstraintTypeNotNull:
411 constraint.Tp = ast.ColumnOptionNotNull
412 case oracle_ast.ConstraintTypeNull:
413 constraint.Tp = ast.ColumnOptionNull
414 case oracle_ast.ConstraintTypeUnique:
415 constraint.Tp = ast.ColumnOptionUniqKey
416 case oracle_ast.ConstraintTypePK:
417 constraint.Tp = ast.ColumnOptionPrimaryKey
418 case oracle_ast.ConstraintTypeReferences:
419 // todo
420 }
421 return
422}
423
424// MySQL DEC/DECIMAL/NUMERIC type max scale is 30
425func LimitSize(dec int) int {

Callers 1

oracleTp2MySQLTpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected