squirrel
squirrel copied to clipboard
Fluent SQL generation for golang
This is more like a question than an issue. Is there a way to use a select sub query inside the `WHERE IN`? something like: `WHERE post.id IN ( SELECT...
It is useful to be able to reset the order-by in some situations, or retrieve the order by. Our case is simple enough, we have a generic function that executes...
The update query is `UPDATE videos v SET channel = $1 FROM channels c WHERE c.channel_id = $2 AND v.channel_id = $3` Builder ``` var channelID int query, args, _...
I am using squirrel to build my sql command with postgres,. Since I starting to use pgvector extension, I need to generate sql command with vector like: ```sql SELECT *...
Hello, DB Fiddle for the example: https://www.db-fiddle.com/f/wpNmAGWfjWoZS4goc8EWfc/0 I was trying to generate a SQL like - ``` INSERT INTO test(id, data_id, type, deleted_at) SELECT 10, data_id, type, deleted_at FROM test...
I want to insert array to the table , the following code does not work. ``` insertMap := map[string]interface{}{ order_column_id: input.OrderID, order_column_assigned_users: []string{userID}, } query, args, err := sq.Insert(ORDER_TABLE). SetMap(insertMap)....
Can `Limit()` and `Offset()` functions make a placeholder for prepare statement? Use squirrel v1.5.4 the result: ``` sql, args, err := squirrel.Select("id").From("mytable").Where("id < ?", 100).Limit(10).Offset(20).ToSql() // output sql: SELECT id...
It would be nice to implement such methods for bulk inserts
#### Problem I have encountered a syntax error when using the `squirrel.Or` construct with Postgres: ``` squirrel.Or{ squirrel.Eq{"field_1": value}, squirrel.Eq{"field_2": value}, } ```` The following error occurs: "ERROR: syntax error...