#1 2013-07-11 10:22:29

longge007
Member
Registered: 2010-06-22
Posts: 107

about single type

In mORMot Framework, when creating, you only use double type, why don't use single type;  sometimes  using double type data will need more storage capacity.

Offline

#2 2013-07-11 12:07:21

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

Re: about single type

Use of "single" is not handled, not planned, at ORM level.

If fact, we rely on a DOUBLE, as it is the native type of our SQLite3 core, and internally by our JSON marshalling.

I'm not convinced that SINGLE may be of any benefit, for parameters or DB storage.
Just use DOUBLE instead.
The only exception I can see may be for dynamic arrays with a lot of contents.

What is the scope of your use case of SINGLE?

Offline

#3 2013-07-11 13:15:52

longge007
Member
Registered: 2010-06-22
Posts: 107

Re: about single type

My data structure include more TSQLRAWBlob( Dynamic Arrays) type  in  database. Let me  think how to solve it. thanks a lot!

Offline

#4 2013-07-11 14:16:59

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

Re: about single type

I've introduced TSingleDynArray, recognized as such in JSON serialization.

May help your work with "array of single" fields.

Offline

#5 2013-07-12 00:48:38

longge007
Member
Registered: 2010-06-22
Posts: 107

Re: about single type

ab wrote:

I've introduced TSingleDynArray, recognized as such in JSON serialization.

May help your work with "array of single" fields.

sorry, I can't find TSingleDynArray, which unit is it ?

Offline

#6 2013-07-12 04:05:53

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

Re: about single type

In latest version of SynCommons.pas.

Offline

Board footer

Powered by FluxBB