465 Commits

Author SHA1 Message Date
Vinícius Garcia
b63990c9f6 Add golint to CI 2021-12-22 22:42:27 -03:00
Vinícius Garcia
733dc2b20b Add status badge 2021-12-22 22:19:00 -03:00
Vinícius Garcia
0f2c6b3dd8 Try to fix some required env vars 2021-12-22 21:47:27 -03:00
Vinícius Garcia
d18ed2b1ab Try to fix and improve the CI script 2021-12-22 20:00:01 -03:00
Vinícius Garcia
71a9810582 Attempt to add CI 2021-12-22 19:44:16 -03:00
Vinícius Garcia
82a43fda87 Add error check for structs with duplicated tag names
Closes #6
2021-12-22 19:36:39 -03:00
Vinícius Garcia
e970a3546a Fix bug on StrucToMap that was including fields not tagged with ksql 2021-12-22 19:19:53 -03:00
Vinícius Garcia
e5e786cf4b Simplify TestMain 2021-12-22 17:56:51 -03:00
Vinícius Garcia
9a30559efa Improve README 2021-12-15 00:27:44 -03:00
Vinícius Garcia
70cfbccce2 Update README to include the new instructions on how to run the tests 2021-12-15 00:20:51 -03:00
Vinícius Garcia
914c351bcc Add docker-test support for SQLServer
This commit adds the last step for running all integration tests
with zero database setup =]
2021-12-15 00:14:32 -03:00
Vinícius Garcia
fe464a217c Add docker test support for mysql 2021-12-14 23:55:49 -03:00
Vinícius Garcia
45edd4b1dd Add docker test setup for postgres
Before this commit the user would need to setup a local postgres
database manually in order to run the tests.

Now we are setting it up using docker-test which makes it easier.

We still require manual setup of sqlserver and mysql databases,
we'll fix these soon so that running the tests become trivial.
2021-12-14 23:34:26 -03:00
Vinícius Garcia
6a4ec2cd51 Update Exec signature to return the number of affected rows 2021-11-26 22:13:56 -03:00
Vinícius Garcia
97e248916c
Update README.md 2021-11-25 17:47:26 -03:00
Vinícius Garcia
a1403dc9d3 Simplify the signature of the Delete() method
This change was finally made because the Delete function was the
only helper function that was not returning the ksql.ErrRecordNotFound
when no rows were found.

The other reason for this change is that we the most common use case is
by far for deleting a single element, and the philosophy of the library
is to optimize for the most common use-cases.

For making it easier to write queries for deleting many items
as well as many other less common use cases we
are already implementing the `kbuilder` package which is a
query builder.
2021-11-22 19:42:33 -03:00
Vinícius Garcia
40215d8099 Minor improvement on README file 2021-11-16 21:55:09 -03:00
Vinícius Garcia
cb3d8eb572 Update benchmarks on README to include sql with prep statements 2021-11-16 21:18:23 -03:00
Vinícius Garcia
545ea48f0c Add benchmarks for the database/sql library using prepared-statements 2021-11-16 21:17:57 -03:00
Vinícius Garcia
fc6a9c2950 Update README with the fixed version of the benchmark 2021-11-16 20:01:56 -03:00
Vinícius Garcia
a5e71303cb Fix problem on the Querying benchmark for sql
By mistake (I forgot to delete a letter) I was calling
`sqlx.Open()` instead of `sql.Open()`, which invalidates
the benchmark.

This is now fixed.
2021-11-16 19:51:16 -03:00
Vinícius Garcia
83f0ce5369 Add constructor to SQLAdapter struct 2021-11-14 18:57:57 -03:00
Vinícius Garcia
25781352cb Add adapters for each possible db technology v1.2.0 2021-11-14 14:54:01 -03:00
Vinícius Garcia
54f19522e6 Update benchmarks on README 2021-11-14 11:23:54 -03:00
Vinícius Garcia
b5a1f92fb8 Add pgx to benchmark 2021-11-14 11:13:35 -03:00
Vinícius Garcia
a4617fc3b4 Update benchmarks on README.md 2021-11-14 01:46:41 -03:00
Vinícius Garcia
3424652db3 Add benchmark for database/sql 2021-11-14 01:36:55 -03:00
Vinícius Garcia
0090b791d2 Update benchmark results on README.md 2021-11-14 01:14:11 -03:00
Vinícius Garcia
23692d13d4 Add gorm to benchmarks 2021-11-14 01:10:57 -03:00
Vinícius Garcia
e2899617f4 Fix benchmarks/go.mod so it always point the the local ksql copy 2021-11-14 00:22:58 -03:00
Vinícius Garcia
e2705f2b8e Move benchmarks to submodule in order to reduce the go.mod deps 2021-11-13 23:59:33 -03:00
Vinícius Garcia
a9c810d4a3 Update README 2021-11-07 01:59:05 -03:00
Vinícius Garcia
4b75696bb4 Add SetDefaultValues() func to the ksql.Config struct 2021-10-30 12:08:03 -03:00
Vinícius Garcia
45cb57cfa8 Add kpgx.New()
This new package kpgx was created so that in the future we can
make it a separate module.

This will be important in order to prevent users from having to
import all the backend libraries even when they might only be
using one of them.
2021-10-27 22:58:35 -03:00
Vinícius Garcia
d280eb1eb1 Add LICENSE v1.1.0 2021-10-01 15:55:45 -03:00
Vinícius Garcia
268e3d3c36 Remove unnecessary extra argument from ksql.NewWithAdapter
To be honest I don't know how it ended up there =P
2021-09-27 18:58:55 -03:00
Vinícius Garcia
af4eba4bf6 Improve how SetFallbackDatabase works so it only sets nil values 2021-09-27 15:12:54 -03:00
Vinícius Garcia
c4df8b1748 Improve ksql.Mock to accept a fallback database 2021-09-27 14:54:30 -03:00
Vinícius Garcia
8bc726c287 Improve tests for Update() 2021-09-19 18:30:19 -03:00
Vinícius Garcia
b92a751d5e Improve tests for the Delete() function 2021-09-18 21:24:22 -03:00
Vinícius Garcia
8b897d8ca9 Add error check for nil pointers passed as arguments to Delete() 2021-09-18 21:00:22 -03:00
Vinícius Garcia
dffba55a8b Add error check for nil pointers passed as arguments to Update() 2021-09-18 20:52:48 -03:00
Vinícius Garcia
1cf671cd33 Add error check for nil pointers passed as arguments to Insert() 2021-09-18 18:29:00 -03:00
Vinícius Garcia
e7e404dc86 Small refactor on Insert() to avoid using reflect.TypeOf multiple times 2021-09-18 18:25:17 -03:00
Vinícius Garcia
889662c4e0 Add error check for nil pointers used as arguments to QueryOne() 2021-09-18 14:42:53 -03:00
Vinícius Garcia
33dd982d7c
Merge pull request #2 from VinGarcia/kbuilder
Adds the kbuilder package (an integrated query builder)
2021-09-17 22:08:19 -03:00
Vinícius Garcia
a503c218ba Improve kbuilder README 2021-09-17 22:06:06 -03:00
Vinícius Garcia
61f21409a0 Improve panic message when ksql.Mock methods are called but unimplemented 2021-09-16 12:35:05 -03:00
Vinícius Garcia
6935bddf29 Add the Insert struct to the kbuilder package 2021-09-07 12:01:34 -03:00
Vinícius Garcia
22fa8fdfa4 Improve the description of the Provider interface 2021-09-03 11:08:52 -03:00