Skip to content

Add array type support for postgresql #275

Open
@aliendrew

Description

@aliendrew

Is your feature request related to a problem? Please describe.
Currently metaschema supports arrays and sets but metasql is unable to properly handle array types.

Describe the solution you'd like
Add postgresql array type support for metasql, so it can be properly handled.
I suggest the following:

points: {
  type: 'array',
  value: 'number',
  dims: [24, 32, 48],
  required: true,
}

to

"points" integer[24][32][48] NOT NULL

points: {
  type: 'array',
  value: 'number',
  dims: 3,
  required: true,
}

to

"points" integer[][][] NOT NULL

points: { array: 'number', length: 2 }

to

"points" integer ARRAY[2] NOT NULL

points: { array: 'number' }

to

"points" integer ARRAY NOT NULL

FYI:
https://www.postgresql.org/docs/current/arrays.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions