You are not logged in.
Pages: 1
Delphi 11.1, mORMot 2.0.3446
Simple example:
var
i: Integer;
v: Variant;
sqlWhere: RawUtf8;
begin
v := 'Thomas';
sqlWhere := FormatUtf8('MetaData->>''$.%''=?', ['Creator'], [v], False);
v := 2;
sqlWhere := FormatUtf8('MetaData->>''$.%''=?', ['ShutterSpeed'], [v], False);
i := 2;
sqlWhere := FormatUtf8('MetaData->>''$.%''=?', ['ShutterSpeed'], [i], False);
end;
Results for sqlWhere:
'MetaData->>''$.Creator''=:(''Thomas''):'
'MetaData->>''$.ShutterSpeed''=:(''2''):'
'MetaData->>''$.ShutterSpeed''=:(2):'
I would expect "v := 2" to give the same result as "i := 2". But it does not. Is that the way it is supposed to be?
With best regards
Thomas
Offline
It was as implemented in mORMot 1 since years.
And tested as such...
But indeed, it was confusing, and wrong.
So please check https://github.com/synopse/mORMot2/commit/efc3bec4
Offline
Pages: 1