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
Vinícius Garcia
54f5b7b1eb
Improve Makefile
2021-06-06 12:15:38 -03:00
Vinícius Garcia
936d387221
Minor improvment on README
2021-06-06 10:10:01 -03:00
Vinícius Garcia
1e434b0b78
Fix code identation on README.md
2021-06-03 23:22:03 -03:00
Vinícius Garcia
208ce07d6e
Update README.md
2021-06-03 23:00:19 -03:00
Vinícius Garcia
3c57bcf1d7
Minor improvement in README
2021-06-03 22:56:50 -03:00
Vinícius Garcia
2ad920968a
Update README to explain the composite structs feature
2021-06-03 22:54:39 -03:00
Vinícius Garcia
e5c7b44e38
Add test to QueryChunks with SELECT generation
2021-06-03 20:15:18 -03:00
Vinícius Garcia
ac1f94a90b
Add nested struct tests for TestQueryOne
2021-05-23 15:05:01 -03:00
Vinícius Garcia
4e201031b7
Update README to include the feature of generating the SELECT part of the query
2021-05-23 15:04:24 -03:00
Vinícius Garcia
9e4583c3f8
Add error check for preventing reflection panics in nested structs
2021-05-23 12:25:35 -03:00
Vinícius Garcia
6bd61346d9
Add more tests to the nested struct feature
2021-05-23 11:32:23 -03:00
Vinícius Garcia
0d3a75fe42
Add feature of nesting structs so we can reuse existing structs
2021-05-23 11:28:16 -03:00
Vinícius Garcia
d8ca3cab8d
Improve README intro
2021-05-19 23:44:03 -03:00
Vinícius Garcia
edecbf8191
Add feature of omiting the "SELECT" part of the query
...
Now the 3 functions that allow you to write plain SQL queries
also work if you omit the `SELECT ...` part of the query.
If you do this the code will check and notice that the first
token of the query is a "FROM" token and then automatically
build the SELECT part of the query based on the tags of the struct.
Everything is cached, so the impact on performance should be negligible.
The affected functions are:
- Query()
- QueryOne()
- QueryChunks()
2021-05-16 17:38:18 -03:00
Vinícius Garcia
d275555df5
Update TODO list
2021-05-15 10:53:12 -03:00
Vinícius Garcia
cb84b02e2e
Improve README so the fact that the benchmark results are good is enphasized
2021-05-10 09:38:45 -03:00
Vinícius Garcia
56aa77135c
Add support to the `sqlserver` driver =]
2021-05-09 22:33:03 -03:00
Vinícius Garcia
2dd55131d5
Add README instructions on how to run the tests
2021-05-08 13:02:01 -03:00
Vinícius Garcia
bbad31ce4d
Add support to the mysql driver
2021-05-08 12:43:11 -03:00
Vinícius Garcia
3a90b03a37
Refactor dialect.go so its easier to add new dialects
2021-05-08 11:56:57 -03:00
Vinícius Garcia
d2c88ed71b
Improve a comment and a test
2021-04-24 12:15:59 -03:00
Vinícius Garcia
99ed52b591
Add a very small README for the kbuilder package
2021-04-10 22:55:04 -03:00
Vinícius Garcia
4c6556af88
Add more tests to the kbuilder package
2021-04-10 22:51:29 -03:00
Vinícius Garcia
186dde8afe
Finish MVP of the kbuilder package
2021-04-10 22:09:18 -03:00
Vinícius Garcia
2fb07cad19
Add first broken version of the kbuilder tool
2021-04-08 23:45:15 -03:00
Vinícius Garcia
398f7f43d7
Update README code example to use the new constructor
2021-04-06 10:21:07 -03:00
Vinícius Garcia
1fc58339fb
Update README
2021-03-12 11:05:12 -03:00
Vinícius Garcia
35c1f42317
Remove var args from Insert and Update, so they actually perform atomic operations in the database
2021-03-12 11:01:36 -03:00
Vinícius Garcia
df7db29464
Rename files kisssql* to ksql*
2021-03-11 22:08:18 -03:00