You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfilters=Math.random()>0.5 ? '' : `bar = 'baz'`;`SELECT * FROM foo WHERE bar = 'foo' ${defaultEmpty`OR ${filters}`}`// -> "SELECT * FROM foo WHERE bar = 'foo' OR bar = 'baz'"// -> "SELECT * FROM foo WHERE bar = 'foo' "
Better name ideas are welcome.
The text was updated successfully, but these errors were encountered:
It's very common pattern to want to append a string only if it's not empty, so I made a helper to do that:
Example:
Better name ideas are welcome.
The text was updated successfully, but these errors were encountered: