MCPcopy Create free account
hub / github.com/bytebase/bytebase / getIndexType

Function getIndexType

backend/plugin/schema/tidb/walk_through.go:1399–1411  ·  view source on GitHub ↗
(option *tidbast.IndexOption)

Source from the content-addressed store, hash-verified

1397}
1398
1399func getIndexType(option *tidbast.IndexOption) string {
1400 if option != nil {
1401 switch option.Tp {
1402 case tidbast.IndexTypeBtree,
1403 tidbast.IndexTypeHash,
1404 tidbast.IndexTypeRtree:
1405 return option.Tp.String()
1406 default:
1407 // Other index types
1408 }
1409 }
1410 return tidbast.IndexTypeBtree.String()
1411}
1412
1413// isCurrentDatabase returns true if the given database is the current database.
1414func isCurrentDatabase(d *model.DatabaseMetadata, database string) bool {

Callers 1

tidbCreateConstraintFunction · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected