Poco::Data::ODBC per-column autoExtract

Discussion of ideas for features and new projects based on POCO.
Posts: 3
Joined: 22 Jun 2016, 11:54

Poco::Data::ODBC per-column autoExtract

Postby chrismc » 03 Nov 2016, 21:07

ODBC allows you to choose on a per-column basis whether to bind (i.e using SQLBindCol()) a single variable to a column in a result-set (i.e such that it gets overwritten on each row), or to specify new storage for each row (i.e using SQLGetData()). Poco::Data::ODBC appears to allow this choice to be made on a per-session basis using the "autoExtract" feature.

There are a number of tradeoffs between these two extract policies, chief among them the ability with SQLGetData() to identify precisely the amount of memory needed for a particular value rather than trying to allocate a single potentially huge buffer (e.g a Sybase "text" column can be >1GiB) upfront.

So I would quite like to add code to allow this choice to be made on a per-column basis, and submit a PR for it. Firstly, is this actually a good idea? Secondly, does anyone have any ideas about how best to do this (e.g provide an API for specifying an array of "autoExtract" booleans for each result-set? or maybe have Poco make the choice automatically based on the type of the column?).



Return to “Wishlist”

Who is online

Users browsing this forum: No registered users and 1 guest