Add db param to defquery.