go-mocket icon indicating copy to clipboard operation
go-mocket copied to clipboard

Go GORM & SQL mocking library

Results 18 go-mocket issues
Sort by recently updated
recently updated
newest added

Any `LIKE %%`-statement with another `Where`-statement is currently not properly checked. This PR resolves that. # Example: ``` golang query = s.db.Table("accounts"). Where("accounts.firstName LIKE ?", "%John%"). Where("accounts.lastName = ?", "Doe")...

Any plans to update for use with [GORM V2](https://gorm.io/docs/v2_release_note.html)? The [Open](https://gorm.io/docs/v2_release_note.html#Quick-Start) function has a bit different usage than V1.

I have the following code testing an INSERT. The goal is to simulate a key already exists; which, when specified with 'ON CONFLICT DO NOTHING' returns no error and instead...

``` func SetupTests(t *testing.T) *gorm.DB { mocket.Catcher.Register() mocket.Catcher.Logging = true db, err := gorm.Open(mocket.DriverName, "connection_string") if err != nil { t.Fatalf(err.Error()) } return db } func TestInsertStoragePool(t *testing.T) { cases...

Using go_ibm_db with DB2 and occasional use MERGE statement then found ```go unimplemented statement Exec command type of MERGE ``` then is it possible to support DB2 statement ?

Many schemas user UUID for a primary key (vs the default int). Add a method that gives the WithID() functionality with UUID, like WithUUID()

Using Gorm with Postgres, CREATE commands (CREATE TABLE, CREATE DATABASE) generate error: > unimplemented statement Exec command type of "CREATE" Looks like an easy fix to add this.

When calling ColumnTypes on a rows object, I get: ``` panic: runtime error: index out of range [0] with length 0 [recovered] panic: runtime error: index out of range [0]...

Improves on logging output and failure reporting by, well, adding more `Printf` here and there and explaining with diffs why a query does not match when looking for a fake...

Kind of address #21, maybe we still want to show some feedback to the user even if `PanicOnEmptyResponse` is false