squirrel icon indicating copy to clipboard operation
squirrel copied to clipboard

Fluent SQL generation for golang

Results 94 squirrel issues
Sort by recently updated
recently updated
newest added

squirrel.Select("").Offset(n).Limit(n).ToSql() the sql can not use in SqlServer

Hello, I want to create reusable conditional query for pagination (count query + offset query). I haven't found any official reusable solution. So far I have following solution: ```go import...

var where = map[string]interface{}{} if data.StartTime > 0 { where["start_time > "] = data.IsDisplay } if data.EndTime > 0 { where["end_time < "] = data.EndTime } if len(where) > 0...

i've read #104 ``` go Expr("(name, age) IN ((?, ?), (?, ?))", "Alex", 10, "Douglas", 40) ``` works well, but i wonder why you did not wrap it as below....

## squirrel ```go where:=map[string]interface{}{"column2":""} setmap:=map[string]interface{}{"column1":"column1 + 1"} // UpdateWorkProperties func UpdateWorkProperties(ctx context.Context, runner sq.BaseRunner, where interface{}, setmap map[string]interface{}) error { logger.Info("UpdateItemNoStatus sq tosql=====================") logger.Info(sq.Update(tableWorkProperties).SetMap(setmap).Where(where).Limit(1).ToSql()) logger.Info("UpdateItemNoStatus sq tosql======================") _, err :=...

Hi guys, hi @lann I noticed that you put "is complete" in the readme. What are the plans? I would be more than happy to help with maintenance (within this...

I have an application that applies a ton of `where` statements to all queries. There is a common struct detailing all of the different filters and where statements that can...

MS SQL has a specific way for definition of returning values. It is similar to Postgres' `RETURNING ID` but should be placed in the middle of the query, so suffix...

Implements stmt cache for transaction Reason of rewrite: Prepared statements should be created on transaction. So cache should be created with using transaction as Preparer Test will be added soon....

hi Team, We've been using Squirrel for a while now and (frankly) love it. The thing we're coming up against is there's not a lot of great support for subqueries....