Commit graph

10 commits

Author SHA1 Message Date
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
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
e50cc4ec73 add specs for statement arguments
add support for blobs (i.e. Slice(UInt8) )
2016-02-25 22:25:54 -03:00
Brian J. Cardiff
8a8b86e31a arguments support 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
Brian J. Cardiff
cc1545a58e db driver registration 2016-02-25 22:25:54 -03:00