Hi,
With FPC version 3.2.2+dfsg-32 I'm connecting to a MySQL 8 database, however it seems to ignore a field if it's type is JSON. (
https://dev.mysql.com/doc/refman/8.0/en/json.html )
Accessing the field's name with query.FieldByName('MyJSONData').AsString results in a "field not found" exception.
Listing all the fields in a request like this :
Query.SQL.Text := 'SELECT * FROM MyTable';
Query.Open;
try
for i := 0 to Query.FieldCount - 1 do
WriteLn('Field ', i + 1, ': ', Query.Fields[i].FieldName);
finally
Query.Close;
end;
Will just ignore the JSON one.
Is support planned, even if working only with a .AsString ?
(If other people run into the same issue, I was able to get my data with this, but it's not pretty) :
SELECT JSON_UNQUOTE(JSON_EXTRACT(JSONData, "$")) AS JSONData
Thanks for any help !