MCPcopy Create free account
hub / github.com/go-pg/pg / appendWith

Method appendWith

orm/query.go:1541–1559  ·  view source on GitHub ↗
(fmter QueryFormatter, b []byte)

Source from the content-addressed store, hash-verified

1539}
1540
1541func (q *Query) appendWith(fmter QueryFormatter, b []byte) (_ []byte, err error) {
1542 b = append(b, "WITH "...)
1543 for i, with := range q.with {
1544 if i > 0 {
1545 b = append(b, ", "...)
1546 }
1547 b = types.AppendIdent(b, with.name, 1)
1548 b = append(b, " AS ("...)
1549
1550 b, err = with.query.AppendQuery(fmter, b)
1551 if err != nil {
1552 return nil, err
1553 }
1554
1555 b = append(b, ')')
1556 }
1557 b = append(b, ' ')
1558 return b, nil
1559}
1560
1561func (q *Query) isSliceModelWithData() bool {
1562 if !q.hasTableModel() {

Callers 4

AppendQueryMethod · 0.80
AppendQueryMethod · 0.80
AppendQueryMethod · 0.80
AppendQueryMethod · 0.80

Calls 2

AppendIdentFunction · 0.92
AppendQueryMethod · 0.65

Tested by

no test coverage detected