GetTableInsensitive implements the interface sql.DatabaseSchema.
(ctx *sql.Context, tblName string)
| 31 | |
| 32 | // GetTableInsensitive implements the interface sql.DatabaseSchema. |
| 33 | func (d Database) GetTableInsensitive(ctx *sql.Context, tblName string) (sql.Table, bool, error) { |
| 34 | // Even though this is named "GetTableInsensitive", due to differences in Postgres and MySQL, this should perform an |
| 35 | // exact search. |
| 36 | if tableMap, ok := handlers[d.db.Schema()]; ok { |
| 37 | if handler, ok := tableMap[tblName]; ok { |
| 38 | return NewVirtualTable(handler, d.db), true, nil |
| 39 | } |
| 40 | } |
| 41 | return nil, false, nil |
| 42 | } |
| 43 | |
| 44 | // GetTableNames implements the interface sql.DatabaseSchema. |
| 45 | func (d Database) GetTableNames(ctx *sql.Context) ([]string, error) { |
no test coverage detected