coopernurse/gorp — pull request #124 by rvenugopal (2014-01-18 03:20:30+00:00)
Title: Fix for Issue #92

What : Fix for https://github.com/coopernurse/gorp/issues/92

Fixes : Added new UpdateWithSelector method for controlling which columns are included in generated update statement.

```
type Person struct {
FirstName string `db:"first_name"`
LastName string `db:"last_name"`
Email	string `db:"email"`
Phone	string `db:"phone"`
}

coll = []string{"first_name", "last_name"}
f := func(cm *gorp.ColumnMap) bool{
for _, a := range coll {
if a == cm.ColumnName {
return true;
}
}
return false
}

count, err := trans.UpdateWithSelector(f, &person)

```