#1 2014-10-16 11:57:02

aruncs08
Member
Registered: 2014-10-13
Posts: 27

Retrieving Data into Objects

Hi,

We are still learning about mORMot framework and we have lots of questions coming up because it is very different what we are used to working with RAD Development.

One of the questions we have right now is: How do we actually retrieving Database Data (Records) into the Object Layer? Do you have any good sample that you can point us to?

Please have patience with us!

Thanks in advance.

Offline

#2 2014-10-16 13:07:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Retrieving Data into Objects

You have several methods at TSQLRest level, like
  TSQLRest.RetrieveList
  TSQLRest.RetrieveList<T>
  TSQLRest.RetrieveListJSON
  TSQLRest.RetrieveDocVariantArray
  TSQLRest.ExecuteList

But IMHO the easiest pattern is TSQLRecord.CreateAndFillPrepare + a loop with FillOne.
Please take a look at the RTFM SAD 1.18 pdf, about queries.

Offline

Board footer

Powered by FluxBB