go-jet

Results 92 comments of go-jet

Yeah, for complex(nested) structs, `sql:"primary_key"` tag is necessary and primary column has to be selected, otherwise query result mapping wouldn't know how to map query result.

Check [FAQ](https://github.com/go-jet/jet/wiki/FAQ#how-to-construct-dynamic-projection-list) for dynamic projection list and condition. The same approach can be used for `ORDER_BY`. `nil` values passed to `WHERE` clause, means `WHERE` clause is omitted. You can check...

Yes, it is sql-injection safe in regard to passed arguments, but when you are using raw sql with string concatenation there are other ways to introduce sql-injection. For MySQL, named...

What does `a.` in `"a.article"` represents? If `a` is schema/database, check [wiki](https://github.com/go-jet/jet/wiki/FAQ#how-to-use-jet-in-multi-tenant-environment). Table alias can't contain `.`, because it is used as separator to specify struct destination field - `.`....

Ok, so `a` is the name of the sub-query. To export a column from the sub-query use `From` method. ```golang aTitle := Article.Title.From(a) ``` Check the wiki - https://github.com/go-jet/jet/wiki/Subquery

Aha, I see what you mean. If you iterate columns from `.AllCoumns` there is no `From` method. Use this workaround, until this is fixed: ```golang var orderBy []OrderByClause for _,...

Hi @gxanshu, I agree that it would be nice, but I don't think it's technically feasible in Go or probably in any other type safe language. It's probably doable for...

Hi @ayaanqui, `geometry`, `geography `and some other types are currently unsupported. All unsupported types are always generated as string. Using generator customization developers can overwrite this behavior, with their types....

Hi @yz89122, > I cannot just write Table2.AnyTypeOfID.EQ(ANY()). jet is a type safe library, so the types needs to match. > But is it possible to add a .EQ_ANY() If...

> ANY, SOME and ALL seem like they're operators Actually, [Strictly speaking, IN and ANY are Postgres "constructs" or "syntax elements", rather than "operators"](https://stackoverflow.com/a/34627688). In SQL they appear as function,...