Skip to content

Provide unordered args matching #207

@franklingu

Description

@franklingu

Specifically, I am referring to this function: https://github.com/DATA-DOG/go-sqlmock/blob/master/expectations_go18.go#L30

When I am using gorm to update like (http://gorm.io/docs/update.html):

// Update multiple attributes with `map`, will only update those changed fields
db.Model(&user).Updates(map[string]interface{}{"name": "hello", "age": 18, "actived": false})
//// UPDATE users SET name='hello', age=18, actived=false, updated_at='2013-11-17 21:34:10' WHERE id=111;

the order of update is not fixed. however, based on sqlmock current matching strategy, I cannot just assert that I updated name+age+actived and order is not important here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions