go-jet / jet

Type safe SQL builder with code generation and automatic query result data mapping
Apache License 2.0
2.23k stars 110 forks source link

Unsupported sql column for the array in postgres #350

Closed iFurySt closed 1 month ago

iFurySt commented 1 month ago

Describe the bug

Environment (please complete the following information):

Code snippet

CREATE TABLE IF NOT EXISTS users (
    id bigserial PRIMARY KEY,
    status boolean NOT NULL DEFAULT true,

    username varchar(255) NOT NULL,
    email varchar(255) NOT NULL,

    roles BIGINT[],

    created_at timestamptz DEFAULT CURRENT_TIMESTAMP NULL,
    updated_at timestamptz DEFAULT CURRENT_TIMESTAMP NULL
);

Expected behavior why don't support the array in postgres?

houten11 commented 1 month ago

Array types are among the Postgres types currently unsupported. You can use raw expressions for sql builder and customize the generator to use your array destination type.

why don't support the array in postgres?

No one implemented it yet.

iFurySt commented 1 month ago

Got it, thanks. I'll have a try.