You are not logged in.
Pages: 1
GetJSONValues gives only tekst values, the number values are converted to Null or nothing at all.
this happens with update c55e03ca6d{1305} at 6-5-2015.
with update/commit {1304} the conversion was still OK.
do I need to add something or is something broken?
Offline
i use
u: RawUTF8;
T: TSQLTableJSON;
T := Server.ExecuteList([TSQLDienst], S2U('SELECT * FROM Dienst'));
u := T.GetJSONValues(False);
Offline
TSQLDienst = class(TSQLRecord)
private
fNaam : RawUTF8;
fVoorNaam : RawUTF8;
fTussenVoegsel: RawUTF8;
fNummer : Int32; // uniek = stored False {to make unique }
fPloeg : TPloegSoort; // (8)
fFunctie : TOpFunctie; // (7)
fPosten : TPosten;
fTime : TDateTime; // date + time of record change
published
property Naam : RawUTF8 read fNaam write fNaam;
property VoorNaam : RawUTF8 read fVoorNaam write fVoorNaam;
property TussenVoegsel: RawUTF8 read fTussenVoegsel write fTussenVoegsel;
property Nummer : Int32 read fNummer write fNummer stored False; // made unique
property Ploeg : TPloegSoort read fPloeg write fPloeg;
property Functie : TOpFunctie read fFunctie write fFunctie;
property Posten : TPosten read fPosten write fPosten;
property Time : TDateTime read fTime write fTime;
end;
//values with latest commit (only first 4 rows, rest I deleted)
//value of T
('ID', 'Naam', 'VoorNaam', 'TussenVoegsel', 'Nummer', 'Ploeg', 'Functie', 'Posten', 'Time',
'1', 'N1', 'V1', nil {#0}, '544', '5', '5', '768', '2012-06-15T18:25:31',
'2', 'N2', 'V2', '', '854', '4', '1', '627', '2014-12-13T08:14:49',
'3', 'N3', 'V3', nil {#0}, '338', '5', '3', '1584', '2012-09-26T17:03:40',
'4', 'N4', 'V4', '', '196', '4', '2', '1650', '2013-09-09T14:54:01', ........
//value of u
'{"fieldCount":9,"rowCount":143,"values":
["ID","Naam","VoorNaam","TussenVoegsel","Nummer","Ploeg","Functie","Posten","Time",
,"N1","V1",null,,,,,"2012-06-15T18:25:31",
,"N2","V2","",,,,,"2014-12-13T08:14:49",
,"N3","V3",null,,,,,"2012-09-26T17:03:40",
,"N4","V4","",,,,,"2013-09-09T14:54:01", .........
now al number values even the ID value are not returned, just get nothing
//old
//values with commit {1304} and older (only first 4 rows, rest I deleted)
//value of T
('ID', 'Naam', 'VoorNaam', 'TussenVoegsel', 'Nummer', 'Ploeg', 'Functie',
'Posten', 'Time',
'1', 'N1', 'V1', nil {#0}, '544', '5', '5', '768', '2012-06-15T18:25:31',
'2', 'N2', 'V2', '', '854', '4', '1', '627', '2014-12-13T08:14:49',
'3', 'N3', 'V3', nil {#0}, '338', '5', '3', '1584', '2012-09-26T17:03:40',
'4', 'N4', 'V4', '', '196', '4', '2', '1650', '2013-09-09T14:54:01', ........
//value of u
'{"fieldCount":9,"rowCount":143,"values":
["ID","Naam","VoorNaam","TussenVoegsel","Nummer","Ploeg","Functie","Posten","Time",
1,"N1","V1",null,544,5,5,768,"2012-06-15T18:25:31",
2,"N2","V2","",854,4,1,627,"2014-12-13T08:14:49",
3,"N3","V3",null,338,5,3,1584,"2012-09-26T17:03:40",
4,"N4","V4","",196,4,2,1650,"2013-09-09T14:54:01", .......
here al number values are returned also the ID value, with correct values
So, how do I get the number values back?
Offline
I've fixed a regression in TSQLTable.GetJSONValues.
See http://synopse.info/fossil/info/e477bcb533
Sorry for the inconvenience.
But IMHO you should try to use TSQLRest.RetrieveListJSON() method directly.
No need to use a temporary TSQLTableJSON storage.
Offline
I've fixed a regression in TSQLTable.GetJSONValues.
See http://synopse.info/fossil/info/e477bcb533
yes, the result is OK again,
thank you very much
But IMHO you should try to use TSQLRest.RetrieveListJSON() method directly.
No need to use a temporary TSQLTableJSON storage.
I didn't know this one, it is indeed easier.
Offline
Again i have an issue wit GetJSONValues, I am getting no values.
I get an error on line 21606 from mORMot, "access violation". (i use latest commit 1593)
I changed most of my GetJSONValues calls to RetrieveListJSON, that works verry well.
But RetrieveListJSON can only handle one Table and also the Where part is limited, so is ORDER not allowed.
So i need GetJSONValues when i use more table's
do I need to add something or is something broken?
Offline
There was a small regression.
Please try http://synopse.info/fossil/info/1029cf9b01
Offline
yes, the result is OK , :-)
thank you very much
Offline
Pages: 1