425 Commits

Author SHA1 Message Date
Vinícius Garcia
13c6f3cbc6 Update adapters to use version v1.5.0 adapters/kmysql/v1.5.0 adapters/ksqlserver/v1.5.0 adapters/ksqlite3/v1.5.0 adapters/kpgx/v1.5.0 2022-11-13 14:14:18 -03:00
Vinícius Garcia
aca042b94b Fix "make update" Makefile recipe v1.5.0 2022-11-13 14:13:52 -03:00
Vinícius Garcia
af37427192 Update adapters to use version v1.4.13 adapters/ksqlite3/v1.4.13 adapters/kpgx/v1.4.13 adapters/ksqlserver/v1.4.13 adapters/kmysql/v1.4.13 2022-11-13 12:56:40 -03:00
Vinícius Garcia
6c0f8ae6b1 Update all adapters to use latest version of KSQL adapters/kpgx/v1.4.12 v1.4.12 v1.4.13 adapters/ksqlserver/v1.4.12 adapters/kmysql/v1.4.12 adapters/ksqlite3/v1.4.12 2022-11-13 11:02:15 -03:00
Vinícius Garcia
c5043c9ff2 Automate the process of running the benchmark and saving it to the README file adapters/kpgx/v1.4.11 v1.4.10 adapters/kpgx/v1.4.10 adapters/ksqlserver/v1.4.10 adapters/ksqlite3/v1.4.11 adapters/ksqlite3/v1.4.10 adapters/kmysql/v1.4.10 adapters/kmysql/v1.4.11 adapters/ksqlserver/v1.4.11 v1.4.11 2022-11-13 10:55:10 -03:00
Vinícius Garcia
5bfb5cd92a Improve error messages for scan errors on all adapters 2022-11-12 15:20:06 -03:00
Vinícius Garcia
d2c90f4e42 Improve docstring for global err variables 2022-11-06 13:24:40 -03:00
Vinícius Garcia
e519b3db27 Minor improvement to one test 2022-10-31 13:03:26 -03:00
Vinícius Garcia
b2e146d5e8
Merge pull request #29 from VinGarcia/add-attr-middlewares
Draft: Create a mechanism for users to add their own implementation of modifiers
2022-10-18 13:01:54 -03:00
Vinícius Garcia
dd8a45c5d5 Rename kmodifiers to ksqlmodifiers adapters/kpgx/v1.4.9 adapters/ksqlite3/v1.4.9 adapters/kmysql/v1.4.9 v1.4.9 2022-10-18 12:57:27 -03:00
Vinícius Garcia
a7f12b34a5 Add godoc to kmodifiers package 2022-10-18 12:55:17 -03:00
Vinícius Garcia
4890563c27 Expose some public types and functions so users can register new modifiers 2022-10-18 12:53:25 -03:00
Vinícius Garcia
ad516d5e1f Add comment to json modifier 2022-10-18 10:50:58 -03:00
Vinícius Garcia
136ee66fe9 Fix behavior of json modifier to match what json.Unmarshal does for nil values
In the original implementation I thought that the `json` package
would set fields to its zero value during unmarshal if the input
JSON had a `null` value for that attribute.

After performing an small experiment I noticed this is not the case.

Thus, I have removed that behavior and now if the json contains
a `null` value for a field this field will be ignored by the
json modifier thus keeping its original value whatever it was.
2022-10-18 10:41:49 -03:00
Vinícius Garcia
e48f82c255 Improve godoc for modifiers.LoadGlobalModifier 2022-10-18 10:35:36 -03:00
Vinícius Garcia
5a7fd93467 Add one extra test for inserting with no values 2022-10-18 09:35:09 -03:00
Vinícius Garcia
511abf659d Remove skipQueries option from modifiers since it was not working yet 2022-10-12 23:00:07 -03:00
Vinícius Garcia
f41edb427d Add three new modifiers and fix a couple bugs
This commit adds these modifiers:

1. skipUpdates (with unit tests)
2. skipInserts (with unit tests)
3. skipQueries (no tests yet) (and not really working yet)

And handles two situations previously not considered:

1. Updates with no attributes will now return a properly formatted
   error instead of returning a syntax error.
2. Inserts with no values will now work on SQLite, Postgres and
   SQLServer
2022-10-12 22:47:33 -03:00
Vinícius Garcia
0d73ac9a18 Minor fix to the AttrModifier struct 2022-10-09 21:58:41 -03:00
Vinícius Garcia
57c0f4cade Add timeNowUTC and timeNowUTC/skipUpdates modifiers 2022-10-09 21:49:21 -03:00
Vinícius Garcia
ae76cd5768 Merge branch 'master' of github.com:VinGarcia/ksql into add-attr-middlewares 2022-10-08 22:35:40 -03:00
Vinícius Garcia
8538d99468 Remove unnecessary dependency on github.com/pkg/errors 2022-10-08 14:56:30 -03:00
Vinícius Garcia
60233e04a8 Add sqlx/prep-stmt benchmark 2022-09-29 14:11:08 -03:00
Vinícius Garcia
fc2b32d919 Remove mention to old name KissSQL 2022-09-28 21:05:24 -03:00
Vinícius Garcia
3a9971628a Minor fix on the crud example 2022-09-28 21:01:53 -03:00
Vinícius Garcia
c46ad0f92c Update README.md 2022-09-28 20:42:21 -03:00
Vinícius Garcia
8cba3efa2d Refactor modifiers so it is represented by a struct 2022-09-26 01:37:23 -03:00
Vinícius Garcia
7661ba0314 Try to fix CI again 2022-09-24 11:57:20 -03:00
Vinícius Garcia
3a0e9b6da3 Try to fix CI 2022-09-24 11:51:21 -03:00
Vinícius Garcia
9e94445cdc Add tests to the modifiers package 2022-09-23 22:49:41 -03:00
Vinícius Garcia
41f4d5487b Refactor modifiers into its own package 2022-09-21 22:30:20 -03:00
Vinícius Garcia
cb15295e46 Rename serializers to modifiers 2022-09-21 21:38:30 -03:00
Vinícius Garcia
a5b33135d1 Minor fix to README file 2022-09-19 23:32:59 -03:00
Vinícius Garcia
f95cd2b7b2 Refactor code so that users can add their own serializers 2022-09-14 23:03:33 -03:00
Vinícius Garcia
67ad75242a Improve some error messages 2022-08-27 12:33:18 -03:00
Vinícius Garcia
86dd623eac Improve some error messages 2022-08-27 12:28:39 -03:00
Vinícius Garcia
8620600d01 Revert "Decouple ksql.DB from TagInfoCache so we can replace it during tests"
This reverts commit 74cb87bea027e7924e614a8f2ff0c9719f8dd4b6.

This was done because I noticed this first commit was unnecessary.

This original commit was written in order to allow tests where
the cache would return errors, but I noticed there is a way
of provoking these errors without the need of an extra layer
of abstraction.

Thus, in order to keep the code simpler and also avoid an extra
level of indirection I am undoing this change.
2022-08-27 12:18:02 -03:00
Vinícius Garcia
4b37adc905 Add more tests to ksql.Query() 2022-08-27 12:16:46 -03:00
Vinícius Garcia
74cb87bea0 Decouple ksql.DB from TagInfoCache so we can replace it during tests 2022-08-24 22:45:24 -03:00
Vinícius Garcia
0e95506343 Force CI to rerun because I reused the codecov token by mistake 2022-08-12 09:49:28 -03:00
Vinícius Garcia
56c1ed54da
Merge pull request #26 from mohamedallam1991/patch-1
Adding badges, Go reference, and report card
2022-08-10 16:39:41 -03:00
Vinícius Garcia
b08934f34e
Merge pull request #27 from mohamedallam1991/patch-2
Type in communication
2022-08-10 16:38:31 -03:00
Mohamed Allam
f155607beb
Type in communication
A type in the word "communication" in the description.
2022-08-10 20:26:45 +01:00
Mohamed Allam
96dc1a5c53
Adding badges, Go reference, and report card
Go report card and Go reference

[Go report card](https://goreportcard.com/report/github.com/vingarcia/ksql)
[Go Reference](https://pkg.go.dev/github.com/vingarcia/ksql)
2022-08-10 20:20:08 +01:00
Vinícius Garcia
d73528bd8b Add tests for the .Close() method 2022-08-03 21:21:31 -03:00
Vinícius Garcia
45d8ef4491 Finishes testing all error cases in the .Transaction() method 2022-08-03 21:05:20 -03:00
Vinícius Garcia
25e77f3f36 Improve code coverage for .Transaction() 2022-08-03 20:58:09 -03:00
Vinícius Garcia
a8dcbd1aaa Add internal_mocks.go to codecov ignore list 2022-08-03 20:57:31 -03:00
Vinícius Garcia
06b8855621 Improve test coverate on .Transaction() 2022-08-03 20:46:32 -03:00
Vinícius Garcia
b5f2deac02 Add a few more tests to Transaction 2022-08-03 20:11:05 -03:00