https://github.com/griffio/sqldelight-postgres-json
sqldelight postgresql json support
https://github.com/griffio/sqldelight-postgres-json
json kotlin postgresql sqldelight
Last synced: 2 months ago
JSON representation
sqldelight postgresql json support
- Host: GitHub
- URL: https://github.com/griffio/sqldelight-postgres-json
- Owner: griffio
- Created: 2024-03-21T17:01:43.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-17T08:49:53.000Z (about 1 year ago)
- Last Synced: 2025-05-19T11:45:46.524Z (about 1 year ago)
- Topics: json, kotlin, postgresql, sqldelight
- Language: Kotlin
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SqlDelight 2.1.x Postgresql Json support
https://github.com/cashapp/sqldelight
Version: 2.1.0
Support JSON and JSONB column types and operations
String is the input and output type for the table API for JSON/JSONB columns
```sql
CREATE TABLE Recipes (
id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
recipe JSONB NOT NULL,
createdAt TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updatedAt TIMESTAMPTZ
);
```
*Not supported*
* Json Operators bind
* e.g `SELECT * FROM Recipes WHERE recipe @> ?`
* MERGED https://github.com/cashapp/sqldelight/pull/5100
* Json column type support
* MERGED https://github.com/cashapp/sqldelight/issues/5028
* Json Operators
* MERGED https://github.com/cashapp/sqldelight/issues/5040
* Json GIN indexes
* MERGED https://github.com/cashapp/sqldelight/issues/5026
* Functions for creating Json and Jsonb values
* MERGED https://github.com/sqldelight/sqldelight/pull/5606
----
```shell
createdb recipes &&
./gradlew build &&
./gradlew flywayMigrate
```
Flyway db migrations
https://documentation.red-gate.com/fd/gradle-task-184127407.html