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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

849 views 2 9
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