Commit graph

10 commits

Author SHA1 Message Date
Stephen von Takach
a25f33611c
feat(error): close resources on resource lost (#155) 2021-09-10 08:36:01 -03:00
Jamie Gaskins
291b65b853
Allow DB::Pool to be used a generic connection pool (#131)
* Allow DB::Pool to be a generic connection pool

* Use fully qualified class name for consistency

Co-authored-by: Brian J. Cardiff <bcardiff@gmail.com>

* Wrap only the necessary code in an `ensure`

* Add spec for http client pool

* Fix ICE in crystal-sqlite3

Co-authored-by: Brian J. Cardiff <bcardiff@gmail.com>
2020-09-14 10:49:00 -03:00
Jeremy Woertink
f08a4da60a
Add NoResultsError (#121) 2020-02-17 22:04:23 +01:00
Lamonte
e40c19d195 Updated MappingException and Rollback derive from DB::Error (#70)
Make all db exceptions derive from DB::Error
2017-11-07 23:18:43 -03:00
Brian J. Cardiff
2ca60ba43f Add ConnectionRefused exception
* required to fix retry+connection initialization corner case.
2016-12-15 14:40:56 -03:00
Brian J. Cardiff
751f8b26ac Transactions
* dsl, state checks
* define transaction sql commands in connection
2016-12-13 16:47:23 -03:00
Brian J. Cardiff
47e7d826e8 Add connection retry logic to connection pool 2016-08-31 17:32:01 -03:00
Brian J. Cardiff
421996b952 resource pool implementation with
* max_pool_size
* initial_pool_size
* max_idle_pool_size
* checkout_timeout
configuration options
2016-07-05 15:21:39 -03:00
Santiago Palladino
7fcedc6711 Database mapping macro
Add `from_rs` method to class to load instances from a resultset. Inspired by YAML and JSON mapping macros.
2016-07-04 11:19:16 -03:00
Ary Borenszweig
9c88f718e8 Require ResultSet to just implement read, optionally implementing read(T.class). Fixes #5 2016-06-30 09:46:25 -03:00