sqrl icon indicating copy to clipboard operation
sqrl copied to clipboard

Fluent SQL generation for golang

Results 7 sqrl issues
Sort by recently updated
recently updated
newest added

Created `RowsScanner` interface to enable mocking `sql.Rows` struct. Potentially solves https://github.com/elgris/sqrl/issues/24

The query params inside a FromSelect are numbered independently from the whole query, so: ``` psql.Update(`mytable`). Set("name", "newname"). FromSelect(psql.Select("column").From("anothertable").Where(sq.Eq{"column": 3})). Where(sq.Eq{"name": "oldname"}) ``` Args will be ["newname", "oldname", 3], but...

Allows the use of subquery as select, specially useful if working with Postgres' functions. It uses the `Column` method and reserves the first argument to be used as an alias.

Currently it is impossible to fully unit test code that is using sqrl since `Query` method requires `*sql.Rows` as return value. I am proposing to add RowsScanner interface that would...

Currently only `Where` method accepts `args` as placeholder values ``` go func (b *SelectBuilder) Where(pred interface{}, args ...interface{}) *SelectBuilder { b.whereParts = append(b.whereParts, newWherePart(pred, args...)) return b } ``` Other...

It would be nice to tell sqrl to escape column names for example "status" is a reserved symbol in mysql. ```golang users := sq.Select("status").From("users").Join("emails USING (email_id)") fmt.Println(users.ToSql()) ``` output is:...

Hi, Is there support for dynamic where clauses? I could not find any documentation about how to do that. In my case I need to add AND'd conditions with nested...