andywer / andywer/squid

Spread Insert does not work for array columns.

Open
#46 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
157
Forks
7
PR merge metrics
No merged PRs in 30d

Description

```js
sql`insert into test_table ${spreadInsert({
array_column: ['a','b','c','d'],
})}`;
```

Yields
```postgresql
insert into "test_table" ("array_column") VALUES ($1, $2, $3, $4)
```
rather than joining and formatting the array value as such
```postgresql
ARRAY['a','b','c','d']
```
or
```postgresql
'{"a","b","c","d"}'
```

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.