Overview
Features
Download
Documentation
Community
Add-Ons & Services

a couple of comments to the 1.5 release

A general discussion forum.

a couple of comments to the 1.5 release

Postby mkaut » 22 Oct 2012, 12:16

Hello,

thanks for the new version, I really like the improvements in Poco::Data.
Also, I had no problems building it on my Debian (LMDE) system.

I have a couple of comments to the release:
  • The RecordSet does not work with Poco::Data::Date. This means that the "advertised" one-liner
    Code: Select all
    std::cout << RecordSet(session, "SELECT * FROM Table");
    does not work if Table contains a column with dates (and possibly time, I have not tested that). Is support for dates coming any time soon, or should I just continue converting dates to strings before import?
  • The last line in documentation of TypeHandler::bind is missing the (newly introduced) 'dir' argument.
  • Not really important, but why cannot the 2nd argument of TypeHandler::prepare be const anymore? The code is using only its getters, so it should not be changing the object .. or not?
  • Also not critical, but the current download includes many OS-X files (like .DS_Store), many of which get actually installed using "make install".

Michal
mkaut
 
Posts: 19
Joined: 17 Oct 2012, 15:22

Re: a couple of comments to the 1.5 release

Postby alex » 22 Oct 2012, 21:19

mkaut wrote:Is support for dates coming any time soon, or should I just continue converting dates to strings before import?

Could be that the driver does not properly detect the underlying data type. What back-end are you using?
mkaut wrote:The last line in documentation of TypeHandler::bind is missing the (newly introduced) 'dir' argument.

We have some other doc issues, will be taken care of for 1.6
mkaut wrote:Not really important, but why cannot the 2nd argument of TypeHandler::prepare be const anymore? The code is using only its getters, so it should not be changing the object .. or not?

If I remember correctly, const was removed to allow for I/O stored procedure parameters.
mkaut wrote:Also not critical, but the current download includes many OS-X files (like .DS_Store), many of which get actually installed using "make install".

We'll put it on the todo list, must be the release script bug.

Thanks.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: a couple of comments to the 1.5 release

Postby mkaut » 24 Oct 2012, 14:03

alex wrote:
mkaut wrote:Is support for dates coming any time soon, or should I just continue converting dates to strings before import?

Could be that the driver does not properly detect the underlying data type. What back-end are you using?


I used MySQL backend.
The code builds, but fails at runtime with the following message:
Code: Select all
terminate called after throwing an instance of 'Poco::InvalidArgumentException'
  what():  Invalid argument


One, possibly connected, observation: Poco::Data::RecordSet has overloaded operator<<, which I would expect to use operator<< of all the data types. However, Poco::Data::Date does not have overloaded operator<<. (It does not help to write one, I tried that - but to me this suggests that the RecordSet is not really meant to work with Date, at least not yet.)
mkaut
 
Posts: 19
Joined: 17 Oct 2012, 15:22

Re: a couple of comments to the 1.5 release

Postby alex » 26 Oct 2012, 04:24

mkaut wrote:However, Poco::Data::Date does not have overloaded operator<<. (It does not help to write one, I tried that - but to me this suggests that the RecordSet is not really meant to work with Date, at least not yet.)

That's not a problem. I don't have time to look at MySQL right now but I suspect it has to do with default date format. We'll take care of it for next release.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: a couple of comments to the 1.5 release

Postby alex » 04 Dec 2012, 08:30

mkaut wrote:Not really important, but why cannot the 2nd argument of TypeHandler::prepare be const anymore? The code is using only its getters, so it should not be changing the object .. or not?

This will be fixed for 1.5.1: https://github.com/pocoproject/poco/issues/25
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: a couple of comments to the 1.5 release

Postby alex » 17 Dec 2012, 05:52

alex wrote:
mkaut wrote:However, Poco::Data::Date does not have overloaded operator<<. (It does not help to write one, I tried that - but to me this suggests that the RecordSet is not really meant to work with Date, at least not yet.)

That's not a problem. I don't have time to look at MySQL right now but I suspect it has to do with default date format. We'll take care of it for next release.

MySQL connector had no DateTime support. It's fixed now and will be in 1.5.1:
https://github.com/pocoproject/poco/com ... 645cb06ac9
https://github.com/pocoproject/poco/com ... 0e1945db88
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron