(ref *ast.TableRef, defaultDatabase, defaultSchema string)
| 177 | } |
| 178 | |
| 179 | func omniTableRefTriple(ref *ast.TableRef, defaultDatabase, defaultSchema string) (string, string, string) { |
| 180 | if ref == nil { |
| 181 | return defaultDatabase, defaultSchema, "" |
| 182 | } |
| 183 | db := ref.Database |
| 184 | if db == "" { |
| 185 | db = defaultDatabase |
| 186 | } |
| 187 | schema := ref.Schema |
| 188 | if schema == "" { |
| 189 | schema = defaultSchema |
| 190 | } |
| 191 | return db, schema, ref.Object |
| 192 | } |
| 193 | |
| 194 | func trimStatement(statement string) string { |
| 195 | return strings.TrimLeftFunc(strings.TrimRightFunc(statement, utils.IsSpaceOrSemicolon), unicode.IsSpace) + ";" |
no outgoing calls
no test coverage detected