Vspheredb, using uuid for check datastore

Hello
When using the following command to check a datastore:
icingacli vspheredb check datastore --name NFS_TEMPLATE
I’m getting the following output:
[UNKNOWN] More than one object found for given filter
The reason are multiple datastores having the same name.
So I want to use the uuid to filter the datastore, but how do I query a usable uuid out of the vspheredb objects database?

Using
SELECT object_name,object_type,uuid FROM object where object_type='Datastore';
I’m getting back something like
bytearray(b'\x16\xe5K\x90\x17B[a\xa9x\n(L\xcf;\xab')
for the uuid, which is not working for the check.

Currently I’m not using Director, so I’m using a python script to create the hosts for Icinga. The Script is using pythons mysql.connector to query the vspheredb.

My versions:
icinga2: r2.13.5-1
icingaweb2: 2.11.1
vspheredb: 1.5.0
icingadb: 1.0.1
mariadb: 10.3.35

Now I found out how to use the uuid in vspheredb. In case, someone else didn’t know:
Query the database with the function “BIN_TO_UUID”. Mysql has this function built in, but I’m using Mariadb. So I had to configure this function manually:

DELIMITER $$

CREATE FUNCTION BIN_TO_UUID(b BINARY(16), f BOOLEAN)
RETURNS CHAR(36)
DETERMINISTIC
BEGIN
   DECLARE hexStr CHAR(32);
   SET hexStr = HEX(b);
   RETURN LOWER(CONCAT(
        SUBSTR(hexStr, 1, 8), '-',
        SUBSTR(hexStr, 9, 4), '-',
        SUBSTR(hexStr, 13, 4), '-',
        SUBSTR(hexStr, 17, 4), '-',
        SUBSTR(hexStr, 21)
    ));
END$$

DELIMITER ;

Now the uuid can be queried with
SELECT BIN_TO_UUID(uuid) FROM objects;