Materialized views syntax error

There's a bug I've spotted where the query engine generates paranthesis () around the select query which gives syntax error when it is run. I cannot disclose the code but it had the following structure:
export const fullStatute = pgMaterializedView("statute_search", {
* column names and their types
}).as(
sql.raw(`
SELECT
* some columns here
FROM
* first table
INNER JOIN
* second table
ON
* condition;
`),
);
export const fullStatute = pgMaterializedView("statute_search", {
* column names and their types
}).as(
sql.raw(`
SELECT
* some columns here
FROM
* first table
INNER JOIN
* second table
ON
* condition;
`),
);
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server