Currently it is necessary to specify the Row when writing the Setting clause:
let updateStatement = sql { schema in
let person = schema.into(Person.self)
Update(person)
Setting<Person> { row in
row.age = 42
}
Where(
person.id == 'fred'
)
}
The Row is already specified in the Update clause so specifying it again is redundant. However it is currently necessary to specify the Row as the Setting clause requires information about which Row is being used, but does not refer to the Row type anywhere.
It would be preferable to be able to omit the Row:
let updateStatement = sql { schema in
let person = schema.into(Person.self)
Update(person)
Setting { row in
row.age = 42
}
Where(
person.id == 'fred'
)
}
Currently it is necessary to specify the Row when writing the Setting clause:
The Row is already specified in the Update clause so specifying it again is redundant. However it is currently necessary to specify the Row as the Setting clause requires information about which Row is being used, but does not refer to the Row type anywhere.
It would be preferable to be able to omit the Row: