Boolean parameters not working

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!

1 answer

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)

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

39 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you