db query builder tests up
db query builder class bugfixed