* Raise a specific class error instead of string literal when the type returned doesn't match the type expected. Allows for drivers to catch the specific error.
* Add ResultSet#next_column_index
* Add shared specs for next_column_index
* Add properties to ColumnTypeMismatchError
* Add shared specs for ColumnTypeMismatchError
* Fix specs
Co-authored-by: Brian J. Cardiff <bcardiff@gmail.com>
* Add logging for executing queries
Arguments are translated to Log::Metadata::Value via DB::Statement#arg_to_log method.
DB::Statement#before_query_or_exec & after_query_or_exec protected methods can be used to hook and run around the statement execution
* Move the metadata converter to a module
* Replace before/after with def_around_query_or_exec macro
* Update src/db/enumerable_concat.cr
Co-authored-by: Ary Borenszweig <asterite@gmail.com>
Co-authored-by: Ary Borenszweig <asterite@gmail.com>
* make Database a ConnectionContext.
* introduce SingleConnectionContext for independant connections.
* add `DB#connect` to create non pooled connections.