WithTemplate returns a builder that is based on the given template.
(t *exql.Template)
| 109 | |
| 110 | // WithTemplate returns a builder that is based on the given template. |
| 111 | func WithTemplate(t *exql.Template) db.SQL { |
| 112 | return &sqlBuilder{ |
| 113 | t: newTemplateWithUtils(t), |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | func (b *sqlBuilder) NewIteratorContext(ctx context.Context, rows *sql.Rows) db.Iterator { |
| 118 | return &iterator{b.sess, rows, nil} |