Ary Borenszweig
2fc3f66a00
Make sure to return the connection to the pool in case of an exception preparing a query
2016-06-29 15:01:26 -03:00
Brian J. Cardiff
f836bbfccb
add Database#using_connection to get a connection from the pool and return it when work is done.
2016-06-23 17:27:30 -03:00
Ary Borenszweig
f834b0f8a6
Updated to Crystal 0.17.4
2016-06-16 12:16:39 -03:00
Brian J. Cardiff
2cb37d374c
ensure db is closed after block
...
avoid GC Warning
2016-02-25 22:27:42 -03:00
Brian J. Cardiff
d45427dfdd
expose database in connection
...
get/return from pool while result set is been used. still single connection pool
2016-02-25 22:27:42 -03:00
Brian J. Cardiff
562d5076bf
use URI as connection string
2016-02-25 22:27:42 -03:00
Brian J. Cardiff
782a2ee0e2
hide #prepare from api.
2016-02-25 22:27:42 -03:00
Brian J. Cardiff
d01da912f7
code review notes
...
close / do_close in result_set
avoid closing statements
remove named arguments
refactor positioned arguments query
2016-02-25 22:25:55 -03:00
Brian J. Cardiff
fd804dd592
switch to 0-pased positional arguments
...
add docs, many docs
2016-02-25 22:25:55 -03:00
Brian J. Cardiff
a96776e336
use connection_string as database configuration instead of a hash
2016-02-25 22:25:55 -03:00
Brian J. Cardiff
8c0313a306
add Connection#last_inserted_id
...
extract QueryMethods modules and use it in Database and Connection
"add" finalize methods, but they cause GC warnings
2016-02-25 22:25:55 -03:00
Brian J. Cardiff
683e6bdfa7
major db refactor for a better api.
...
`#query`, `#exec`, `#scalar`, `#scalar?` as main query methods from `Database`
blocks overrides that ensure statements are closed.
2016-02-25 22:25:54 -03:00
Brian J. Cardiff
caf2676aad
column_count and column_names
...
close result_set and statements
main entry points for exec_non_query and exec_query closing them when ready
2016-02-25 22:25:54 -03:00
Brian J. Cardiff
1572062501
introduce database as driver wrapper.
...
expose list of types to support by the drivers implementors.
deal with nilable types with `#read?(T.class) : T?` methods.
change `#has_next` to `#move_next`
2016-02-25 22:25:54 -03:00