Description
Hello and a big thank you for all the hard work done so far.
I have a question or maybe a bug report / fix. Not sure yet what it is.
If i use the text[] type provided by the postgresql package, i am unable to set data to my where statement. In code i dont see which operators should work out of the box with the array type. So i wrote an extension:
It's more or less a copy of the hstore class.
I set the param like this:
.whereWithConditions {it += foldersTable.fkClient eq clientId filterObject.mapParameters()?.apply { it += this } it += documentsTable.tags.overlap(arrayOf("Offerten")) }
It will not allow me to set the paramter. However, if i change the setParameter to:
override fun doSetParameter(ps: PreparedStatement, index: Int, parameter: TextArray) { ps.setArray(index, ps.connection.createArrayOf("text",parameter)) }
It works.
So:
- What i am i doing wrong?
- Is it a bug?
- Do the @> and && operators not exist yet*?
*i am happy to provide my extension class code to help