MCPcopy Create free account
hub / github.com/cloudwan/gohan / DropTable

Method DropTable

db/sql/sql.go:584–591  ·  view source on GitHub ↗

DropTable drop table definition

(s *schema.Schema)

Source from the content-addressed store, hash-verified

582
583//DropTable drop table definition
584func (db *DB) DropTable(s *schema.Schema) error {
585 if s.IsAbstract() {
586 return nil
587 }
588 sql := fmt.Sprintf("drop table if exists %s\n", quote(s.GetDbTableName()))
589 _, err := db.DB.Exec(sql)
590 return err
591}
592
593func escapeID(ID string) string {
594 return strings.Replace(ID, "-", "_escape_", -1)

Callers

nothing calls this directly

Implementers 4

DBdb/sql/sql.go
MockDBdb/mocks/db.go
MockDBMockRecorderdb/mocks/db.go
DBdb/file/file.go

Calls 4

IsAbstractMethod · 0.80
GetDbTableNameMethod · 0.80
quoteFunction · 0.70
ExecMethod · 0.65

Tested by

no test coverage detected