smallnest / gen

Converts a database into gorm structs and RESTful api
Apache License 2.0
1.43k stars 234 forks source link

Support for uuid and CHARACTER varying[] in Postgres database #61

Open GeekEast opened 4 years ago

GeekEast commented 4 years ago
GeekEast commented 4 years ago

Suggestion

alexj212 commented 4 years ago

@GeekEast I added uuid support for postgres handling it as a string - Looking into CHARACTER varying

dwgeneral commented 4 years ago
CREATE TABLE order_details (
    order_id smallint NOT NULL,
    product_id smallint NOT NULL,
    unit_price real NOT NULL,
    quantity smallint NOT NULL,
    discount real NOT NULL
);

It seems like gen doesn't support the real type of Postgresql

table: order_details unable to generate struct field: unit_price type: FLOAT4 error: unknown sql type: float4
table: order_details unable to generate struct field: discount type: FLOAT4 error: unknown sql type: float4
alexj212 commented 4 years ago