Commit Graph

11 Commits

Author SHA1 Message Date
Jeremy Woertink b1299fcada
Raise a specific class error instead of string literal (#156)
* 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>
2021-10-12 20:49:26 -03:00
Brian J. Cardiff af200eac54 Comply exhaustive case check
Comply exhaustive case check
2020-04-02 12:34:27 -03:00
Johannes Müller b3898ae2a2 Statement#exec and #query require named argument for array values (#110)
This change allows to use an array as single argument for #exec and
 #query and #scalar methods. Before it was shadowed by the *args splat overload.
2019-09-20 17:23:09 -03:00
Brian J. Cardiff af6d837bcd
Remove call to obsolete Spec.matches? (#111)
It was an optimization but it does not work (and is not needed) since the changes in spec for Crystal 0.31
2019-09-12 11:04:34 -03:00
Brian J. Cardiff 6c7aea0528 docs & formatting 2017-04-10 10:28:17 -03:00
Brian J. Cardiff 456ff5aa36 Add specs to use ResultSet as DB::ResultSet 2017-04-06 15:57:27 -03:00
Brian J. Cardiff 074368a47e Add drop table syntax
* Allows to run all test in same database by deleting tables if exists
2017-04-06 15:57:27 -03:00
Brian J. Cardiff 07b4e9f4a8 Minor fixes. Use some type for `.scalar("select ?", nil)` 2017-04-06 15:57:27 -03:00
Brian J. Cardiff dba3c03da8 Include sql_type for sql_scalar when available. 2017-04-06 15:57:27 -03:00
Brian J. Cardiff 168aac142c switch for prepared/unprepared specs. pass ColumnDefs instead of names 2017-04-06 15:57:27 -03:00
Brian J. Cardiff f80e689c87 common specs extracted from crystal-mysql 2017-04-06 15:57:27 -03:00