Santiago Palladino
9ca0b19d9e
Support mappable classes in query_one and query_all methods
2016-07-04 12:46:45 -03:00
Santiago Palladino
552b6e12b4
Rebase to latest DB version and upgrade to Crystal 0.18
2016-07-04 12:13:39 -03:00
Santiago Palladino
5773faaa5c
Enumerate columns in result_set
2016-07-04 11:11:21 -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
Brian J. Cardiff
9f3f0a9836
#5 remove read_object. allow read / read? to receive any type
2016-06-21 12:10:09 -03:00
Brian J. Cardiff
5b23114095
add ResultSet#read_object
2016-06-21 10:54:58 -03:00
Brian J. Cardiff
d69555b372
make Nil a proper column type
2016-06-21 10:53:34 -03:00
Brian J. Cardiff
928c1517dc
update to 0.12 features
...
clarify expected protocol with ResultSet in docs
minor refactors suggested
2016-02-25 22:27:42 -03:00
Brian J. Cardiff
0cb7adabdb
full type name in restriction
2016-02-25 22:27:42 -03:00
Brian J. Cardiff
4ed7f28fe6
ensure exec and scalar release connection
...
ensure exec, query can be executed with Enumerable(Any)
update db doc sample
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
fa111fd698
add statement cache in connection.
...
hide methods from api
2016-02-25 22:27:42 -03:00
Brian J. Cardiff
b92d08bf74
refactor db disposables
2016-02-25 22:27:42 -03:00
Brian J. Cardiff
3598dddb65
split perform_query and perform_exec
...
add DB::ExecResult to have a concurrency safety exec result
remove connection string from abstract DB::Connection
2016-02-25 22:25:55 -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
1fb0b8a82b
add ResultSet#exec
to ensure the query is performed. By default generates a move_next
.
2016-02-25 22:25:54 -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
Brian J. Cardiff
c16dc42e96
allow result_set#each
2016-02-25 22:25:54 -03:00
Brian J. Cardiff
4dd0312934
prepare/exec a statement
...
dummy driver that parses the query
initial type support for result_sets
2016-02-25 22:25:54 -03:00