dc1969 / delphi-orm

Automatically exported from code.google.com/p/delphi-orm
0 stars 0 forks source link

Implement "Command Pattern" for NON query SQL DML command #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The "Commanders" are needed where a single SQL operation is faster than a 
classic ORM approach. Let's say we have a table called PRODUCTS and we need to 
apply a discount of 20% on all products. Using the current implementation I've 
to load all the products, applica the discount and then save them one by one. 
This is the corrent way to to things if there are consistency check o validity 
check implemented in the object, but is there aren't validity check, I need a 
faster way. A commander is for an UPDATE/DELETE/INSERT what a finder id for 
SELECT.

Will be used in the same way but do not return any lists.

Session.Execute(TApplyGlobalDiscount.Create(20));

Original issue reported on code.google.com by daniele....@gmail.com on 3 Jan 2012 at 1:57

GoogleCodeExporter commented 9 years ago

Original comment by daniele....@gmail.com on 2 Feb 2014 at 9:44

GoogleCodeExporter commented 9 years ago

Original comment by daniele....@gmail.com on 1 Apr 2014 at 10:48