#Key value array column - Typeorm & Postgres

1 messages · Page 1 of 1 (latest)

vocal halo
#

Hello, i'm trying to create a column with string indexed array,

In the entity :

 @Column({
   type: 'text',
    array: true,
    nullable: false,
  })
  description!: Properties[];

Here is the interface :

export interface Properties {
  [key: string]: string;
}

It seems i'm just defining an array of string so far. Tried to search for an example but all I found was some string[] or number[]

Thanks.

old shard
#

Why not using json or jsonb as column type?