(ctx context.Context, query interface{}, args ...interface{})
| 170 | } |
| 171 | |
| 172 | func (b *sqlBuilder) QueryContext(ctx context.Context, query interface{}, args ...interface{}) (*sql.Rows, error) { |
| 173 | switch q := query.(type) { |
| 174 | case *exql.Statement: |
| 175 | return b.sess.StatementQuery(ctx, q, args...) |
| 176 | case string: |
| 177 | return b.sess.StatementQuery(ctx, exql.RawSQL(q), args...) |
| 178 | case *adapter.RawExpr: |
| 179 | return b.QueryContext(ctx, q.Raw(), q.Arguments()...) |
| 180 | default: |
| 181 | return nil, fmt.Errorf("unsupported query type %T", query) |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | func (b *sqlBuilder) QueryRow(query interface{}, args ...interface{}) (*sql.Row, error) { |
| 186 | return b.QueryRowContext(b.sess.Context(), query, args...) |
no test coverage detected