#1 2011-11-30 19:06:04

Philnext
Member
Registered: 2011-11-03
Posts: 17

TDataSet in mORMot

hello
I just look to the mORMot doc, and it seems a great package. But as it's early for me to switch my projects to an ORM and I just want to test code in some of my little projects (may be Open Source one) and for, it , I would know if you have considered to expose the 'DataBase' layer to a standard TDataSet ?

Offline

#2 2011-11-30 21:11:12

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

Re: TDataSet in mORMot

Since we did not want to use DB RAD components, wanted to have a light solution with only tuned classes and not the huge DB.pas and Co.
So it was on purpose that we did not use TDataSet since the beginning.
As a benefit, even the "Starter" edition of Delphi is able to use our classes.
And we tried to make it as Open as possible (with a tri-license).
I know mORMot is already used in several Delphi Open Source projects.

You can do RAD screen definition and use our framework to work with.
For instance, SynDBExplorer is just a thin VCL application using our DB layer (without the ORM part).
We have a dedicated TDrawGrid wrapper available, which is very fast and optimized to work with our TSQLTable component.

But to make an existing application evolve, if you rely on TQuery classes, you have a wrapper in our SynDB unit.

Thanks for your interest.

Offline

#3 2011-12-01 11:34:00

Philnext
Member
Registered: 2011-11-03
Posts: 17

Re: TDataSet in mORMot

Thank you ...
OK I didn't know the wrapper in SynDB. But I thought that TQuery is depending on the deprecated BDE library. No ?

Last edited by Philnext (2011-12-01 11:38:47)

Offline

#4 2011-12-01 14:45:17

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

Re: TDataSet in mORMot

This is a TQuery-emulator.

Not a true TQuery, but a class with the same name, and some identical methods.
You don't have all original's functions, but the main features are available.

In user code, you may just change the function which retrieve a TQuery, and let the SQL code untouched.

It is a very small and optimized wrapper, so it will be very fast.
For instance, we use hashing for column names, so even the slow FieldByName() methods are much faster to use in our TQuery implementation.

And since you have less layers and we avoided most data transfert, performance could be very high (especially with Oracle).

Offline

#5 2011-12-01 15:27:19

Philnext
Member
Registered: 2011-11-03
Posts: 17

Re: TDataSet in mORMot

Thanks...I'll try it !

Offline

Board footer

Powered by FluxBB