MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / tableRefSQL

Function tableRefSQL

pkg/sql/ast/sql.go:1302–1327  ·  view source on GitHub ↗
(t *TableReference)

Source from the content-addressed store, hash-verified

1300}
1301
1302func tableRefSQL(t *TableReference) string {
1303 sb := getBuilder()
1304 defer putBuilder(sb)
1305 if t.Lateral {
1306 sb.WriteString("LATERAL ")
1307 }
1308 if t.Subquery != nil {
1309 sb.WriteString("(")
1310 sb.WriteString(t.Subquery.SQL())
1311 sb.WriteString(")")
1312 } else {
1313 sb.WriteString(t.Name)
1314 }
1315 if t.Alias != "" {
1316 sb.WriteString(" ")
1317 sb.WriteString(t.Alias)
1318 }
1319 if t.Final {
1320 sb.WriteString(" FINAL")
1321 }
1322 if t.ForSystemTime != nil {
1323 sb.WriteString(" ")
1324 sb.WriteString(t.ForSystemTime.ToSQL())
1325 }
1326 return sb.String()
1327}
1328
1329func joinSQL(j *JoinClause) string {
1330 sb := getBuilder()

Callers 9

SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
joinSQLFunction · 0.70

Calls 5

getBuilderFunction · 0.85
putBuilderFunction · 0.85
SQLMethod · 0.45
ToSQLMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected