implement base QueryBuilder using composition rather than inheritance