Vinícius Garcia
b6e6667a3f
Improve the names of some public types *breaking change*
2021-06-28 17:35:46 -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
c0d7206dcc
Breaking change: Update SQLProvider interface so methods receive table info as argument
2021-06-06 20:51:13 -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
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
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
56aa77135c
Add support to the `sqlserver` driver =]
2021-05-09 22:33:03 -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
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