How do i use dummy table in ql?
I'm not well versed in SQL and ql. I'm adding ql support to one object relational mapper. When I was implementing many to many support I came across this query.
INSERT INTO blog_tags (blog_id, blog_locale, tag_id, tag_locale) SELECT $1, $2, $3, $4 WHERE NOT EXISTS (SELECT * FROM blog_tags WHERE blog_id = $1 AND blog_locale = $2 AND tag_id = $3 AND tag_locale = $4)
A quick google and some tinkering I came across the dummy table thing. This query works fine in postgres but it does not work in ql. I was wondering if there is a way I can write a query like this.