Added $class parameter to Connection::query() for consistency.
Added docs for custom queries.