WinterYukky / gorm-extra-clause-plugin

The clause support plugin for gorm, that not supported by gorm.
MIT License
50 stars 9 forks source link

Support materialized CTEs #72

Open lawrencejones opened 7 months ago

lawrencejones commented 7 months ago

Allow specifying the modifier that enforces an optimisation fence for Postgres CTEs.

lawrencejones commented 7 months ago

Hey team 👋

This is pretty useful if you want to opt-into the materialized modifier when referencing CTEs, such as when you want to use the CTE as an optimisation fence.

WinterYukky commented 6 months ago

Thanks submit this PR @lawrencejones !! We would like to accept and release your initiative, so can you write test code to see if the queries are generated as expected?The test code does not actually run the query in the database, so no database preparation is required.