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

Function forSQL

pkg/sql/ast/sql.go:1388–1404  ·  view source on GitHub ↗
(f *ForClause)

Source from the content-addressed store, hash-verified

1386}
1387
1388func forSQL(f *ForClause) string {
1389 sb := getBuilder()
1390 defer putBuilder(sb)
1391 sb.WriteString(" FOR ")
1392 sb.WriteString(f.LockType)
1393 if len(f.Tables) > 0 {
1394 sb.WriteString(" OF ")
1395 sb.WriteString(strings.Join(f.Tables, ", "))
1396 }
1397 if f.NoWait {
1398 sb.WriteString(" NOWAIT")
1399 }
1400 if f.SkipLocked {
1401 sb.WriteString(" SKIP LOCKED")
1402 }
1403 return sb.String()
1404}
1405
1406func cteSQL(cte *CommonTableExpr) string {
1407 sb := getBuilder()

Callers 1

SQLMethod · 0.70

Calls 3

getBuilderFunction · 0.85
putBuilderFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected