Fix issue with qualified table names
As suggested by one user of the KSQL library I should start doing official releases like this one explaining all the changes and updates every time I release a new version.
Since I have not been doing actual releases for a long time (I was only creating tags but with no description of the changes) this release will describe all new features and updates ever since the last version that was officially released, namely: v1.6.0
- Remove direct import to
github.com/lib/pq
from thekpgx
adapter. This still doesn´t completely remove it from the indirect dependencies because this library is an indirect dependency used on pgx for testing (if I remember correctly). - Add
kpgx5
adapter. This adapter is just like thekpgx
adapter but works using pgx v5 instead of pgx 4. - Add
modernc-ksqlite
adapter. This adapter is just like theksqlite
adapter but it uses the https://pkg.go.dev/modernc.org/sqlite implementation, which, although not being as widely used and battle-tested as the former, does not depend on CGO which is a big advantage in many situations. - Remove the deprecated
Update()
function: use thePatch()
function instead (which has the exact same implementation). This function was renamed fromUpdate
toPatch
because it contains the "patching" feature of automatically ignoring null pointers instead of trying to set the attribute to NULL. This behavior would be counter-intuitive if someone tried to guess its behavior from the nameUpdate
. Also having the nameUpdate
used for this prevented me from in the future adding an actualUpdate
function on v2, which is something I intend to do, and deprecating/removing this now will probably prevent users from not noticing this subtle difference when updating to v2, so I considered that this breaking change was would probably make the update safer in the future. - Move the
ksql.Dialect
interface to subpackagesqldialect
and rename it tosqldialect.Provider
. - Add
ksql.InjectLogger()
function for helping debug query errors. - When using the
Patch()
method without providing all required IDs KSQL will now return aksql.ErrRecordMissingIDs
with a more appropriate error message. - Fixes an issue that prevented the
Insert
,Patch
andDelete
helper functions from working with qualified table names, e.g.public.users
.
And that is pretty much all of it, I hope you guys like it