Skip to content

Postgresql Text[] #450

Open
Open
@skch-17

Description

@skch-17

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:

image

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:

  1. What i am i doing wrong?
  2. Is it a bug?
  3. Do the @> and && operators not exist yet*?

*i am happy to provide my extension class code to help

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions