omniTableRef extracts database and table name from an omni TableRef.
(ref *ast.TableRef, defaultDB string)
| 169 | |
| 170 | // omniTableRef extracts database and table name from an omni TableRef. |
| 171 | func omniTableRef(ref *ast.TableRef, defaultDB string) (string, string) { |
| 172 | if ref == nil { |
| 173 | return defaultDB, "" |
| 174 | } |
| 175 | db := ref.Schema |
| 176 | if db == "" { |
| 177 | db = defaultDB |
| 178 | } |
| 179 | return db, ref.Name |
| 180 | } |
| 181 | |
| 182 | // extractTableExprs collects schema resources from a slice of TableExpr. |
| 183 | func extractTableExprs(exprs []ast.TableExpr, defaultDB string) []base.SchemaResource { |
no outgoing calls
no test coverage detected