MCPcopy Create free account
hub / github.com/araddon/qlbridge / SourceName

Method SourceName

rel/sql.go:1312–1328  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1310func (m *SqlSource) IsLiteral() bool { return len(m.Name) == 0 }
1311func (m *SqlSource) Keyword() lex.TokenType { return m.Op }
1312func (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}
1329func (m *SqlSource) String() string {
1330 w := expr.NewDefaultWriter()
1331 m.WriteDialect(w)

Callers 6

loadFinalMethod · 0.45
WalkSourceSelectMethod · 0.45
LoadConnMethod · 0.45
loadMethod · 0.45
WalkSourceMethod · 0.45
WalkSourceExecMethod · 0.45

Calls 1

LeftRightFunction · 0.92

Tested by

no test coverage detected