drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Allow passing in arbitrary strings into `pgMaterializedView().with()`

Open
#3,672 5 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Feature hasn't been suggested before.

- [X] I have verified this feature I'm about to request hasn't been suggested before.

### Describe the enhancement you want to request

I want to create materialized views in TimescaleDB (which uses Postgres under the hood).

```sql
CREATE MATERIALIZED VIEW stats_minute
WITH (
timescaledb.continuous -- This is the problem, I can't pass this into `pgMaterializedView().with()`
) AS
SELECT time_bucket('1 minute', time) AS bucket,
count(*) AS point_count,
FROM stats
GROUP BY bucket;
```

I haven't been able to figure out how to set this.

Docs for their `CREATE MATERIALIZED VIEW`: https://docs.timescale.com/api/latest/continuous-aggregates/create_materialized_view/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.