I guess this is a bug report. When a database table has column of type boolean (or anything non-String), the :param mechanism fails. In a macro I set the :param's value to 'true', and I just get:
org.postgresql.util.PSQLException: ERROR: operator does not exist: boolean = character varying
Evidently the text 'true' is being wrapped in quotes or typecast to a varchar.
Otherwise, thanks for an excellent plugin!
Hi Jeff,
Thank you for your interest in PocketQuery! You're right. Booleans are not actually passed as booleans to the query, but as strings. I tested this locally and found that MySQL seems not to complain about it but translates the values somehow vice-versa. I don't know if I'd call this a but or simply a missing feature. Anyhow, we already have the Patameter Types configuration for queries. I added another type Boolean and you should now be able to mark your parameter as boolean by writing paramName=Boolean in the input Parameter Types next to your query. I created a temporary version for you here. Could you test if this works for you? If so, I'll plan to release this feature with PocketQuery 2.1 in February.
Regards, Felix (Scandio)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.