houtn11

Results 35 comments of houtn11

+1 @wexder, your line can be simplified a bit using RawBool ```golang RawBool("moment.statuses @> #status", postgres.RawArgs{"#status": string(domain.MomentStatusActive)}) ```

Can you use `EXCLUDED.ColumnName` instead?

`String` is already exported. You are importing the wrong package. You need to import a dialect-specific package. For instance: `github.com/go-jet/jet/v2/postgres`

@Joker666 What's your query? Can't you use `EXCLUDED.ColumnName`?

`EXCLUDED` is a standard postgres keyword. More info here - https://www.postgresql.org/docs/15/sql-insert.html. Assuming we have this query: ```golang Link.INSERT(Link.ID, Link.URL, Link.Name, Link.Description). VALUES(100, "http://www.postgresqltutorial.com", "PostgreSQL Tutorial", DEFAULT). VALUES(100, NULL, "PostgreSQL Tutorial",...

https://github.com/go-jet/jet/wiki/Statements#raw-statements

From the raw statements [wiki](https://github.com/go-jet/jet/wiki/Statements#raw-statements): > Every projection has to be aliased in `destination type name`.`field name` format. So, you can't use `*`, you have to alias each column yourself:...

Alias should be just `destination type name`.`field name`: ```sql SELECT article_edit as "permission.editArticle" -- permission not permissions or user.permissions ```

There is no need to wrap the parameter with `'`. ```golang if q != "" { has = `article.title LIKE $s` args["$s"] = "%" + q + "%" } ```

Use `ColumnList` instead: https://github.com/go-jet/jet/wiki/INSERT