Open ggggxiaolong opened 4 years ago
I think we shouldn't merge this.
1) what if I want to search empty line? select name from products where description = '';
2) why and when do you add empty column name? It seems like a bug. If you want to add dynamic query without mutable variable I think to add modify
method will better than it.
I think we shouldn't merge this.
- what if I want to search empty line?
select name from products where description = '';
- why and when do you add empty column name? It seems like a bug. If you want to add dynamic query without mutable variable I think to add
modify
method will better than it.
and_where_eq
not *_like
like "%"
or like "%%"
is needlessFor example you have a filter on a form. And according of its value you show records from database and pinned records: .or_where("pin") .or_where_like_any(filter)
With empty filter you will see all records, and its a normal. In your variant you can see only pinned recods
I have plans to make an universal WHERE query constructor, but I haven't yet decided how to make it convenient and visual
go-sqlbuilder for golang looks awful:
sb := sqlbuilder.NewSelectBuilder()
sb.Select("id", "name", sb.As("COUNT(*)", "c"))
sb.From("user")
sb.Where(sb.In("status", 1, 2, 5))
ignore like mask is "" or feild is ""