Query returns query representation of a `CREATE VIEW` statement. CREATE VIEW [IF NOT EXISTS] name AS (view definition)
()
| 122 | // |
| 123 | // (view definition) |
| 124 | func (v *ViewBuilder) Query() (string, []any) { |
| 125 | v.WriteString("CREATE VIEW ") |
| 126 | if v.exists { |
| 127 | v.WriteString("IF NOT EXISTS ") |
| 128 | } |
| 129 | v.writeSchema(v.schema) |
| 130 | v.Ident(v.name) |
| 131 | if len(v.columns) > 0 { |
| 132 | v.Pad().Wrap(func(b *Builder) { b.JoinComma(v.columns...) }) |
| 133 | } |
| 134 | v.WriteString(" AS ") |
| 135 | v.Join(v.as) |
| 136 | return v.String(), v.args |
| 137 | } |
| 138 | |
| 139 | // InsertBuilder is a builder for `INSERT INTO` statement. |
| 140 | type InsertBuilder struct { |
nothing calls this directly
no test coverage detected