go-mocket
go-mocket copied to clipboard
Go GORM & SQL mocking library
I noticed that the statement prepared by go-mocket and the one prepared by GORM were not the exact same: ``` `MOCK_FAKE_DRIVER` is not officially supported, running under compatibility mode. 2020/01/30...
The statment of UPSERT in postgres: INSERT INTO ... ON CONFLICT ON CONSTRAINT DO UPDATE ... Currently in https://github.com/Selvatico/go-mocket/blob/master/stmt.go#L16, command only takes in first word. And for INSERT Case, there...
My tests are passing half of the time and failing half of the time when using go-mocket mock and a response struct. example test: ``` Describe("GetApplicationStatuses", func() { Context("on success",...
Great library. Works wonderfully, except when I am trying to match long multiline queries. copied the query recommended by the ``` 2019/06/26 11:29:07 mock_catcher: check query: SELECT c.week, c.count FROM...
Hi, I am using gorm as ORM in my golang project. I was initially using sqlmock for unit testing now I have switched to go-mocket since it is recommended by...
I'd like to propose a new API, take a look at this example: ```go import "testing" import mocket "github.com/selvatico/go-mocket" import "app/app/entity" func TestDelete(t *testing.T) { var expectedId int = 1...
``` //return driver.RowsAffected(fResp.RowsAffected), nil /******************************************* * the code in jinzhu/scope line 360~374 * ******************************************** / Exec perform generated SQL func (scope *Scope) Exec() *Scope { defer scope.trace(NowFunc()) if !scope.HasError() {...
When we'd like to fire exception when execute `INSERT` commands, we should call `.WithExecException()` rather than `.WithQueryException()`