honestly - I think this is not supported by the code (yet). All that works is reading and writing TGUIDField. We didn't cover parameters with ftGuid, when we wrote that part. As a workaround I suggest you do a select where the GUID is part of the statement until we can implement the missing feature. If you want to accept the challenge of implementing this, I am willing to support you with necessary information.
Best regards,
Jan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I understand that direct work is not possible as soon as TParam.AsGUID is missing in DB.pas.
But PostgreSQL works ok with string uuid values, even without specifying direct type case (::uuid), and query text like SELECT * from DATA where DATA.uuidfield = '8a0460d4-f58f-4f07-b4ac-a7b5b6a860a5' works peerfectly.
And also variant of:
SELECT * from DATA where DATA.uuidfield = :UUIDVALUE
Query.ParamByName('UUIDVALUE').AsString := '8a0460d4-f58f-4f07-b4ac-a7b5b6a860a5';
had been working correct in 7.3 for sure, and possibly even in 7.1 Zeos versions. So, something wrong is exactly in 7.2.
Btw, will check possible problem with "{" and "}" symbols
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Finally, adding or removing "{" and "}" in the guid value does not match. Resultset is returned empty. If the same query text executed directly on Postgres, result test is ok.
I was wrong about 7.1 - this version does see GUID fields in the result set at all, but string parameters handling is ok. Possibly I had some older build of 7.2 that worked before.
Last edit: Alexey Nalimov 2018-02-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Alexey,
honestly - I think this is not supported by the code (yet). All that works is reading and writing TGUIDField. We didn't cover parameters with ftGuid, when we wrote that part. As a workaround I suggest you do a select where the GUID is part of the statement until we can implement the missing feature. If you want to accept the challenge of implementing this, I am willing to support you with necessary information.
Best regards,
Jan
Hi !
I understand that direct work is not possible as soon as TParam.AsGUID is missing in DB.pas.
But PostgreSQL works ok with string uuid values, even without specifying direct type case (::uuid), and query text like SELECT * from DATA where DATA.uuidfield = '8a0460d4-f58f-4f07-b4ac-a7b5b6a860a5' works peerfectly.
And also variant of:
SELECT * from DATA where DATA.uuidfield = :UUIDVALUE
Query.ParamByName('UUIDVALUE').AsString := '8a0460d4-f58f-4f07-b4ac-a7b5b6a860a5';
had been working correct in 7.3 for sure, and possibly even in 7.1 Zeos versions. So, something wrong is exactly in 7.2.
Btw, will check possible problem with "{" and "}" symbols
Finally, adding or removing "{" and "}" in the guid value does not match. Resultset is returned empty. If the same query text executed directly on Postgres, result test is ok.
I was wrong about 7.1 - this version does see GUID fields in the result set at all, but string parameters handling is ok. Possibly I had some older build of 7.2 that worked before.
Last edit: Alexey Nalimov 2018-02-08
Hello Alexey,
this should be solved in the current SVN version of Zeos 7.2. Could you please test that again?7
Best regards,
Jan
This has been fixed.