MCPcopy
hub / github.com/go-gorm/gorm / GetTables

Method GetTables

migrator/migrator.go:209–213  ·  view source on GitHub ↗

GetTables returns tables

()

Source from the content-addressed store, hash-verified

207
208// GetTables returns tables
209func (m Migrator) GetTables() (tableList []string, err error) {
210 err = m.DB.Raw("SELECT TABLE_NAME FROM information_schema.tables where TABLE_SCHEMA=?", m.CurrentDatabase()).
211 Scan(&tableList).Error
212 return
213}
214
215// CreateTable create table in database for values
216func (m Migrator) CreateTable(values ...interface{}) error {

Callers

nothing calls this directly

Implementers 1

Migratormigrator/migrator.go

Calls 3

CurrentDatabaseMethod · 0.95
ScanMethod · 0.65
RawMethod · 0.65

Tested by

no test coverage detected