You are not logged in.
Pages: 1
Is there a document available which lists which units different declarations have moved to? For example TDocVariantData moved from SynCommons to mormot.core.variants etc?
I am trying to find the location for TDocVariantData.InitFromTypeInfo and also busy making a list of common mormot types that I use a lot and where they are now to make migrating existing projects easier.
Offline
What is the mormot 2 class for TSQLTableWritable called?
Offline
What is the mormot 2 class for TSQLTableWritable called?
Maybe: unit mormot.orm.rest -> TOrmTableWritable
I did the conversion by taking the descriptive part of the name, in your case TSQLTableWritable => "TableWritable", and running a grep over all units. And as a second option, you can look for the compatibility definitions (example: type TSqlTable = TOrmTable). With this methods, you make fast progress.
With best regards
Thomas
Last edited by tbo (2022-08-11 20:16:49)
Offline
SQL is usually changed to Orm
I use the total commander to make searches in the files of Mormot2 source if something can not be found in the second attempt
Offline
Thanks TOrmTableWritable works perfectly. I've been using windows grep for most of the day searching for the replacements. Not sure how I missed this one. Looks like my list is now starting to become useful. I should be able to start migrating as soon as I find out about TDocVariantData.InitFromTypeInfo
Offline
InitArray* probably?
Offline
It doesnt look as if the InitArray* functions do the same
Offline
There's no direct equivalent inside TDocVariantData, you can write your own InitFromTypeInfo using same code
Something like TDocVariantData.InitJson(SaveJson(AValue, ATypeInfo));
Offline
It does exist something to initialize a TDocVariant from a dynamic array.
/// initialize a variant instance to store some dynamic array content
procedure InitArrayFrom(var aItems; ArrayInfo: PRttiInfo;
aOptions: TDocVariantOptions; ItemsCount: PInteger = nil); overload;
Offline
If the new name for a class isn't obvious (e.g. remove the "SQL") I just search for a piece of text from the comments - the ones I've searched for so far have been unchanged.
Cheers, Bob
Offline
Will the InitArrayFrom still provide the same structure / result when it is not an array? I thought that would only apply to dynamic array types.
Last edited by squirrel (2022-08-15 07:34:24)
Offline
Pages: 1