开发者

HOW TO: squeryl full update

I'm new to squeryl and I have a question in squeryl full updates..

Can anybody please explain what is actually a full update and how it is done ?开发者_运维百科 I couldn't really understand full update in squeryl guide.

Thanx...


A partial update is similar to calling Update in SQL. You give values for some fields, and a where clause determines on which row the update happens.

With a full update, you simply give an object of the type that is mapped to the table, it means update the row with the same primary key as the object, set all fields (hence "full" update) to the value they have in the object. You simply call the update method on the table, passing the object (you can also pass a collection (Iterable) of them, updating them all).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜