Skip to content

Releases: ShiftLeftSecurity/gaum

Add SetSQLRow to conflict handlers

21 Oct 23:53
7352590
Compare
Choose a tag to compare

Add the possibility to prepend ROW to the update statement on conflict to please pg >11

Add chain as insert parameter and fix join order

13 Oct 13:48
95132dd
Compare
Choose a tag to compare

JOIN order is now respected, the join statements you add will be rendered in the order they were added to the chain, allowing for reference between them using aliases.

Insert and insertMulti now understand that, if one of the insertion values is a chain.ExpressionChain the intention is for that to be rendered as a SQL query inside the VALUES. Bear in mind, no checks happen on the validity of the SQL statement for that use.

Add FOR UPDATE

07 Apr 16:06
c2e7f36
Compare
Choose a tag to compare

Add partial locking to select

Support slice of pointer

30 Mar 20:54
43e66d7
Compare
Choose a tag to compare

Added support for passing []*struct to the fetching methods.

Bugfix for CTEs

29 Jan 00:38
1fd180b
Compare
Choose a tag to compare

Fixes a bug when constructing queries that contain more than 2 WITH (cte) statements

Support FROM as JOIN for UPDATE

15 Nov 22:28
5b347d5
Compare
Choose a tag to compare

According to official doc (https://www.postgresql.org/docs/9.1/sql-update.html) for the UPDATE statement, the way to perform a JOIN is to use FROM and WHERE

Upgrade PGX version

09 Sep 19:49
3ad9235
Compare
Choose a tag to compare

Just a maintenance move to reduce friction with users.

Support Modules

05 Sep 15:23
7d4e6cb
Compare
Choose a tag to compare

We now support go modules, net minor upgrade will remove vendored folder.

1.0 New API

24 Jul 22:00
9ffa6ab
Compare
Choose a tag to compare
  • Removed a lot of copied code, this is now worth reading by anyone without inducing a headache)
  • Split some of the chain surface into files with some per functionality organization.
  • Added a few missing tests, now there is a better coverage that could still use some refactoring to be more concise.
  • Updated a lot of docs, the gian and quite comprehensive Readme now has more examples that should make getting to know gaum easier.
  • Fixed the long standing typo on Expresion -> Expression (this is what produced the version change)
  • Gave more decent names to constructor and added a no db required constructor.
  • Completed formatter functionality, we now have a simple way to make some templating in the query, mostly to allow easy table prefixes without having to wrap every field in a function or for cases where that is not possible.

v0.1.17

16 Jul 21:29
a342f48
Compare
Choose a tag to compare

This is quite a featureful release:

  • CTEs are now ordered: CTEs retain the order in which they were added, to make for nicer interdependence and ease testing.
  • HAVING: We gained support for the Having keyword
  • UNION: We gained support for making union of multiple ExpresionChain and produce a SQL UNION statement with it.
  • Added support for RETURNING to UPDATE (previously it was only possible in INSERT)
  • Gained String() method in ExpresionChain for easier debugging of queries and error formatting.
  • Added noopScanner to the automatic mapping of query results to struct fields so we do not fail when a column without match is returned (we do log said event though so you do not miss it)
  • Added a special nullScanner to string and time.Time type receivers so when scanning a NULL column into a non pointer field of these two types you get Zero value instead of error (the built in sql scanner expects recipients of nullable columns to be pointers to represent the nullity but some times we just don't care)
  • Finally fixed a few bugs like EExec not properly unpacking arguments.

Special thanks to @alexhornbake and @Ferada for their great participation in this release.