[fpc-pascal] How to add new methods in a existent generic type?
silvioprog
silvioprog at gmail.com
Thu Feb 27 07:53:21 CET 2014
2014-02-26 16:15 GMT-03:00 silvioprog <silvioprog at gmail.com>:
> 2014-02-26 13:28 GMT-03:00 Sven Barth <pascaldragon at googlemail.com>:
>
[...]
Generics power:
https://raw.github.com/silvioprog/dopf/master/demos/entity/demo1.lpr
Soon, I'll:
storage.Entity.Id := 3;
storage.Entity.Name := 'Sven';
storage.Save; // storing entity ...
storage.Modify; // modifying
storage.Move(NewEntity); // moving entity ...
...
for Person in storage.List.Entities do
WriteLn('ID: ', Person.Id, ' Name: ', Person.Name);
ie. without SQL, but also allowing user to use a specific SQL (link SQL
with joins).
Thanks Joao and Sven!
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140227/9ed7538c/attachment.html>
More information about the fpc-pascal
mailing list