haskell-beam/beam

Idea: Optimize simple boolean filters

開放

#93 建立於 2017年12月4日

 (1 則留言) (0 個反應) (0 位負責人)Haskell (191 個分叉)auto 404
enhancementgood first issue

倉庫指標

星標
 (631 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

I often have conditional filtering in my queries which causes beam to produce where clauses that look like WHERE ((true) AND (true)) AND (true).... It seems it would be easy to clean this up when building the queries by just realizing that a known (val_ True) combined with &&. can simplify to one side or the other. I'm not sure if this is "in-scope" with this project, but if it were easy, it would make the resulting queries cleaner.

I could see an argument against this if one wanted to have a very clear 1-to-1 correspondence between the beam DSL and generated SQL.

貢獻者指南