nobrin / macaron

A simple O/R mapper for SQLite
http://nobrin.github.com/macaron/
MIT License
31 stars 8 forks source link

Empty Q object causes SQL syntax error #36

Open nobrin opened 9 years ago

nobrin commented 9 years ago

Empty Q() object will causes SQL syntax error.

q = Q()
User.select(q)

This means "SELECT * FROM user WHERE (())" in SQL. In case of empty Q object, it should be ignored.