()
| 1310 | func (m *SqlSource) IsLiteral() bool { return len(m.Name) == 0 } |
| 1311 | func (m *SqlSource) Keyword() lex.TokenType { return m.Op } |
| 1312 | func (m *SqlSource) SourceName() string { |
| 1313 | if m == nil { |
| 1314 | return "" |
| 1315 | } |
| 1316 | if m.SubQuery != nil { |
| 1317 | if len(m.SubQuery.From) == 1 { |
| 1318 | return m.SubQuery.From[0].Name |
| 1319 | } |
| 1320 | u.Warnf("could not find source name bc SubQuery had %d sources", len(m.SubQuery.From)) |
| 1321 | return "" |
| 1322 | } |
| 1323 | _, right, hasLeft := expr.LeftRight(m.Name) |
| 1324 | if hasLeft { |
| 1325 | return right |
| 1326 | } |
| 1327 | return right |
| 1328 | } |
| 1329 | func (m *SqlSource) String() string { |
| 1330 | w := expr.NewDefaultWriter() |
| 1331 | m.WriteDialect(w) |
no test coverage detected