Vinícius Garcia
25781352cb
Add adapters for each possible db technology
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
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
Vinícius Garcia
ba6727b14a
Improve the list of methods on the kbuilder.Query struct
...
Add the queryBuilder interface
Make the kbuilder.Query implement this interface
Add kbuilder.Query.Build() helper method for facilitating the usage if
the person prefers no to inject the kbuilder.Builder struct.
2021-08-17 12:08:39 -03:00
Vinícius Garcia
f68b71a0a1
Merge branch 'master' into kbuilder
2021-08-08 19:34:22 -03:00
Vinícius Garcia
6e3e558407
Update benchmark on README
2021-08-01 15:20:22 -03:00
Vinícius Garcia
37298e2c24
Simplify NewWithPGX() function
2021-08-01 15:04:47 -03:00
Vinícius Garcia
5c2b981696
Add tests to the pgx adapter
2021-08-01 14:42:39 -03:00
Vinícius Garcia
ec749af84c
Update benchmarks by running the PGx adapter benchmarks
2021-08-01 11:57:03 -03:00
Vinícius Garcia
87f57f665f
Add code for benchmarking the PGX adapter
2021-08-01 11:52:04 -03:00
Vinícius Garcia
5d6f1d7d37
Improve NewWithPGX() constructor
2021-08-01 11:51:40 -03:00
Vinícius Garcia
657ed7414b
Add first version of the pgx adapter
2021-08-01 10:23:10 -03:00
Vinícius Garcia
c1a44c8e56
Update benchmark on README
2021-07-31 19:09:05 -03:00
Vinícius Garcia
e73db4a216
Abstract the DBAdapter so that we can support other sql adapters
...
This was done for a few different reasons:
1. This allows us to work on top of the pgx client in the future
2. This would allow our users to implement their own DBAdapters
to use with our tool.
3. This gives the users the option of using advanced configs
of any sql client they want to use and just feed us with it
after the configuration is done, which means we will not have
to worry about supporting a growing number of configurations
as we try to add support to more drivers or if we get issues
asking for more advanced config options.
2021-07-31 18:55:08 -03:00
Vinícius Garcia
f420553e0b
Remove risk of panic on Insert()
...
This panic used to happen if the user configured a table to use
a specific ID column then tried to insert to the database
with a struct that did not have that column.
2021-07-15 23:22:34 -03:00
Vinícius Garcia
b6e6667a3f
Improve the names of some public types *breaking change*
2021-06-28 17:35:46 -03:00
Vinícius Garcia
682f99b495
Improve postgres container in docker-compose.yml
...
Now the postgres container will create the ksql database
automatically.
2021-06-24 21:43:23 -03:00
Vinícius Garcia
2a38ae3998
Improve Update method to return ErrRecordNotFound if no rows were updated
2021-06-13 15:11:17 -03:00
Vinícius Garcia
5b351c8ba2
Rename package structs to kstructs so its unambiguous
2021-06-11 12:53:56 -03:00
Vinícius Garcia
20f49eb22b
Reorganize files so the test helpers are grouped in the same pkg
2021-06-11 12:25:24 -03:00
Vinícius Garcia
5b9b0dd00d
Add CallFunctionWithRows() for help testing calls to QueryChunks
2021-06-10 15:57:46 -03:00
Vinícius Garcia
75330a12c5
Update benchmark on README
2021-06-06 21:11:05 -03:00
Vinícius Garcia
34a07b75b5
Run go mod tidy
2021-06-06 20:58:12 -03:00
Vinícius Garcia
cc4e73dc62
Update README to describe the new interface
2021-06-06 20:56:20 -03:00
Vinícius Garcia
c0d7206dcc
Breaking change: Update SQLProvider interface so methods receive table info as argument
2021-06-06 20:51:13 -03:00