Skip to content

Commit

Permalink
Add document to insert array data (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
koxudaxi committed Apr 24, 2021
1 parent e964abd commit da8f863
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ The API converts RESTful request to SQL statements.
- MySQL
- PostgreSQL

## How to insert array data into PostgreSQL
DataAPI have not support inserting array data with `SqlParameter` yet.
But, @ormu5 give us this workaround to insert array data.
```sql
insert into cfg.attributes(id, type, attributes)
values(:id, :type, cast(:attributes as text[]));
```
where the value for attributes parameter is a string properly formatted as Postgres array, e.g., `'{"Volume","Material"}'`.

Thanks to @ormu5.



## Version 0.6.0
### local-data-api has been re-written in Kotlin
#### Motivation
Expand Down

0 comments on commit da8f863

Please sign in to comment.