538 Commits

Author SHA1 Message Date
Vinícius Garcia
589ad0a693 Minor improvement to README 2022-07-04 00:08:28 -03:00
Vinícius Garcia
683d6b28ab Minor improvement to README 2022-07-04 00:03:26 -03:00
Vinícius Garcia
047107d1c3 Minor improvement to README 2022-07-04 00:01:58 -03:00
Vinícius Garcia
ee933fe94d Minor improvements to README file 2022-07-04 00:01:12 -03:00
Vinícius Garcia
df71d5a7eb Add a link to the Wiki to the start of the README file 2022-07-03 23:56:34 -03:00
Vinícius Garcia
cf93f7441a Update README by moving some specialized sections to the Wiki 2022-07-03 23:43:58 -03:00
Vinícius Garcia
be9f686a9a Update benchmarks to test ksql on its most common use-case
Before this commit we were not benchmarking ksql with the
"omit-select" feature.

This could lead people to say that this feature is actually
expensive, but it really isn't so I just updated the benchmarks
to always run with this feature.

Before doing this change I actually put both features together
on the benchmark to compare them and these are the results:

```
ksql/sql-adapter/single-row-12               17186   143286 ns/op
ksql/sql-adapter-with-omit/single-row-12     16502   142893 ns/op

ksql/sql-adapter/multiple-rows-12            15361   153890 ns/op
ksql/sql-adapter-with-omit/multiple-rows-12  15360   156075 ns/op

ksql/pgx-adapter/single-row-12               33894    68332 ns/op
ksql/pgx-adapter-with-omit/single-row-12     34563    68861 ns/op

ksql/pgx-adapter/multiple-rows-12            29677    79196 ns/op
ksql/pgx-adapter-with-omit/multiple-rows-12  28934    80422 ns/op
```

Please note that benchmarks usually run slighly slower or faster
on each attempt, so small differences like the ones presented
above are really hard to interpret.
2022-05-31 09:19:24 -03:00
Vinícius Garcia
ed0327babe Very minor refactor for removing the use of init() 2022-05-18 17:07:05 -03:00
Vinícius Garcia
9792e11b16 Minor improvement on ksql.go 2022-05-11 17:13:45 -03:00
Vinícius Garcia
3701f0f325 Simplify repo example 2022-05-07 22:30:30 -03:00
Vinícius Garcia
527c79ad1c Add an example repository showing how to use transactions 2022-05-07 22:26:27 -03:00
Vinícius Garcia
af6ee27e3a Add error check for unexported fields with the ksql tag 2022-05-02 23:11:31 -03:00
Vinícius Garcia
1ed7684b6d Add case-insensitive support for database columns
Some databases (maybe all of them) will set the database column
names to lowercase.

This was problematic because we needed to match these names
with the ksql tags, which were not lowercased.

Now we support both versions, lowercased or not.
2022-04-30 13:01:03 -03:00
Vinícius Garcia
550ba9e8d9 Update examples/all_adapters so it uses db.Close() 2022-04-22 19:19:19 -03:00
Vinícius Garcia
e78fced5e6 Update all subpackages to use latest ksql version 2022-04-22 19:16:53 -03:00
Vinícius Garcia
f9b7487d9b Minor improvements to the README.md 2022-04-22 19:12:20 -03:00
Vinícius Garcia
6227e23466 Try to simplify CI script 2022-04-21 10:06:35 -03:00
Vinícius Garcia
76bad8c8f2 Try to fix CI again v1.4.6 2022-04-20 20:01:10 -03:00
Vinícius Garcia
3899bb8a75 Update go.mod for fixing CI 2022-04-20 19:20:41 -03:00
Vinícius Garcia
e5d1de061b Since golint is deprecated we upgraded to staticheck instead 2022-04-20 15:37:26 -03:00
Vinícius Garcia
1eca192677 Fix linter complaints 2022-04-19 17:46:09 -03:00
Vinícius Garcia
2e3c809c8c Update README and examples to use defer db.Close() 2022-04-19 11:13:02 -03:00
Vinícius Garcia
d2ee98e038
Merge pull request #20 from lonre/pr18
Implements `io.Closer` for `DB`
2022-04-19 11:06:10 -03:00
Lonre Wang
01ce253442 Implements io.Closer for DB
Fix #18
2022-04-19 01:36:02 +08:00
Vinícius Garcia
3eb5a72123 Add more configurable constructors for all adapters 2022-04-11 20:52:40 -03:00
Vinícius Garcia
b44c7e8500 Add kpgx.NewFromPgxPool() for facilitating more complicated configs v1.4.5 2022-04-11 19:41:56 -03:00
Vinícius Garcia
1224a1b297 Mention the new ksql.Mock examples on the README 2022-04-06 18:32:37 -03:00
Vinícius Garcia
2bf3a1a124 Create new example test showing how to use ksql.Mock{} 2022-04-06 18:29:28 -03:00
Vinícius Garcia
d229767d98 Add tls.Config to ksql.Config v1.4.4 2022-04-03 21:28:49 -03:00
Vinícius Garcia
660904718b Update README with some ksql.Mock examples 2022-03-29 23:03:46 -03:00
Vinícius Garcia
a59940361d Run the benchmark tests on CI 2022-03-27 10:22:15 -03:00
Vinícius Garcia
c2c8d02a1b Fix test coverage issue 2022-03-27 10:16:51 -03:00
Vinícius Garcia
1ce6aa9634 Remove kmysql tests from CI, it failts too often
The mysql container is failing to start too often, which is
forcing me to rerun the CI several times just so the kmysql tests pass
2022-03-27 09:58:23 -03:00
Vinícius Garcia
4e3cc96919 Update Makefile to run all tests locally 2022-03-27 09:49:18 -03:00
Vinícius Garcia
60835ac429 Fix go.mod on examples module 2022-03-27 09:46:29 -03:00
Vinícius Garcia
34d0fc0236 Fix run-all-tests.sh script so it adds the replace directive 2022-03-27 09:40:34 -03:00
Vinícius Garcia
f6ed380095 Fix false failed build by forcing it to run again
I made no changes in the code but because of how codecov works
it is falsely reporting that the test coverage changed to a lower
value.
2022-03-26 22:18:28 -03:00
Vinícius Garcia
9ff5f70753
Merge pull request #17 from VinGarcia/fix-issue-with-module-version
Try to fix go modules issue
v1.4.3
2022-03-26 22:03:50 -03:00
Vinícius Garcia
0dfb810693 Try to fix go modules issue 2022-03-26 21:06:10 -03:00
Vinícius Garcia
fe4530f983
Merge pull request #14 from VinGarcia/refactor-all-adapters-as-modules
Refactor all adapters as Go modules
v1.4.2
2022-03-15 21:06:31 -03:00
Vinícius Garcia
eb46b454cb Simplify run-all-tests script 2022-03-15 21:01:14 -03:00
Vinícius Garcia
1d396f8cac Fix linter complaints 2022-03-15 20:55:18 -03:00
Vinícius Garcia
18377f18f9 Try to fix codecov on CI 2022-03-15 19:55:08 -03:00
Vinícius Garcia
b6986e5fd1 Fix benchmarks submodule 2022-03-15 19:41:34 -03:00
Vinícius Garcia
9b7e5ddfbc Run go mod tidy on the ksql module 2022-03-15 17:02:52 -03:00
Vinícius Garcia
04e5e5da7b Update the README.md TODO list 2022-03-15 16:59:09 -03:00
Vinícius Garcia
8eb3c86410 Refactor all adapters as separate modules 2022-03-15 13:03:41 -03:00
Vinícius Garcia
bf9181566b Extract newDBAdapter as an argument from RunTestsForAdapter
Before this commit we were declaring it inside the RunTestsForAdapter
function, now we declare it outside this function.

This is necessary so we can move the adapters to its respective modules.
2022-02-28 23:53:02 -03:00
Vinícius Garcia
a77bd26473 Minor refactor simplifying the arguments to the adapter tests 2022-02-28 23:49:18 -03:00
Vinícius Garcia
5337a9a59e Simplify ScanRows test 2022-02-28 23:18:15 -03:00