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

I'm trying to use this library for SingleStore MySQL DB. By Insertbuilder, I've got this query string. ``` pgQb().Insert("hello").Columns("user_id", "name").Values( 3, "test" ) ``` ```INSERT INTO hello(user_id, name) VALUES ($1,$2)...

I have a Quotes table, there is a created_at time, in the format of DATETIME, I am using the line query = query.OrderBy(Quotes.created_at DESC") Which totally works fine, but when...

This PR adds placeholder support for MSSQL drivers that use MSSQL syntax e.g. https://github.com/denisenkom/go-mssqldb.

``` query := sq.sq.Select(`COALESCE(MAX(ID),0)`).From(`channel`) if len(name) != 0 { query = query.Where(sq.Eq{"name":name}) } if true { query = query.Where(sq.Eq{"active":active}) } // result // sql = SELECT COALESCE(MAX(ID),0) FROM channel WHERE...

Some arguments of wherePart lost because they override by ToSql method

Hello! Help me, please! How to make query to update multiple row with squirrel?

Hi, I'm trying to add a gently guide on how to use squirrel

liek this ```go func (m *customLabelModel) InsertBatch(rows []*Label) error { var labelInsertRows = strings.Join(stringx.Remove(labelFieldNames, "`id`"), ",") insert := squirrel.Insert("").Into(m.table).Columns(labelInsertRows) for _, row := range rows { insert = insert.Values(row.Id, row.Title,...

I have a GET endpoint that searches a resource by converting a struct into a map and passing it to Squirrel ``` whereClauseMap := map[string]interface{}{ user_first: "Joe", user_last: "Shmo", }...

Hi 👋 I suggest adding a "between" condition by adding sq.Bt(sq.Between)