cockroachdb / cockroachdb/sequelize-cockroachdb

Sequelize CockroachDB Array Type Syntax Incorrect

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
55
Forks
18
PR merge metrics
No merged PRs in 30d

Description

When creating an array, sequelize executes this command:
```
INSERT INTO "channels" ("subjects") VALUES (ARRAY[]::VARCHAR(255)[]) RETURNING *;'
```
However this results in CockroachDB throwing an error:
```
pq: cannot determine type of empty array. Consider annotating with the desired type, for example ARRAY[]:::int[]
```
But if we use 3 colons instead of two such as `ARRAY[]:::VARCHAR(255)[]` the function works as expected.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.