What can I do if SqlDelight does not support the POINT data type in Postgres?

25 views Asked by At

As it looks like based on the documentation about SqlDelight, there is no support for the Point Datatype.

Given that I'd rather not want to match the database to a library, let's assume for the sake of this example that I have an existing database with the Point datatype. How can I write insert statements?

Unfortunately, I cannot even write the following in apartment.sq file:

CREATE TABLE apartment(
    id              BIGSERIAL   NOT NULL,
    location        POINT
);

Error:

<type name real> expected, got 'POINT'

I haven't tested adapters, but to my understanding if I declare this table with a different underlying data type, wrong statements would be generated anyway when trying to insert a point.

0

There are 0 answers