Vinícius Garcia
b8cbfbd45b
Improve doc comments on mocks.go
2021-12-30 12:53:46 -03:00
Vinícius Garcia
0ff7a92d72
Add tests for the error messages produced by the Mock()
2021-12-30 12:12:33 -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
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
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
61f21409a0
Improve panic message when ksql.Mock methods are called but unimplemented
2021-09-16 12:35:05 -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
c0d7206dcc
Breaking change: Update SQLProvider interface so methods receive table info as argument
2021-06-06 20:51:13 -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
8b8fb092d8
Replace all instances of lower-cased kisssql for ksql
2021-03-10 10:11:18 -03:00
Vinícius Garcia
568c61bdba
Replace all ocurrencies of `KissORM` for `KissSQL`
2021-03-08 11:18:52 -03:00
Vinícius Garcia
f655576bb3
Fix some comments so the linter stops complaining
2021-01-21 16:10:14 -03:00
Vinícius Garcia
5d083e35f0
Add tests for the Transaction function
2021-01-17 10:54:21 -03:00
Vinícius Garcia
e49aa5f620
Add example tests to `examples/testing`
2021-01-03 13:41:21 -03:00