extractRangeVarNames extracts database, schema, table from a RangeVar with defaults.
(rv *ast.RangeVar, defaultDB string, searchPath []string)
| 215 | |
| 216 | // extractRangeVarNames extracts database, schema, table from a RangeVar with defaults. |
| 217 | func extractRangeVarNames(rv *ast.RangeVar, defaultDB string, searchPath []string) (string, string, string) { |
| 218 | db := rv.Catalogname |
| 219 | schema := rv.Schemaname |
| 220 | table := rv.Relname |
| 221 | if db == "" { |
| 222 | db = defaultDB |
| 223 | } |
| 224 | if schema == "" && len(searchPath) > 0 { |
| 225 | schema = searchPath[0] |
| 226 | } |
| 227 | return db, schema, table |
| 228 | } |
| 229 | |
| 230 | // handleDropTableOmni handles DROP TABLE/MATERIALIZED VIEW. |
| 231 | func handleDropTableOmni(n *ast.DropStmt, database string, searchPath []string, dbMetadata *model.DatabaseMetadata, changedResources *model.ChangedResources) { |
no outgoing calls
no test coverage detected