Skip to content

PDO Float Type #2500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

PDO Float Type #2500

wants to merge 4 commits into from

Conversation

adambaratz
Copy link
Contributor

@adambaratz adambaratz commented May 1, 2017

This is for discussion of a related RFC. Ignoring the notes about filling in test coverage, this is otherwise all that's needed to implement the feature (I've tested manually with most drivers).

@krakjoe krakjoe added the RFC label May 2, 2017
@madorin
Copy link
Contributor

madorin commented May 13, 2017

Adam, just for curiosity, why not name it PDO::PARAM_FLOAT?, more readable than FLT
We have already types longer than 3 chars, like BOOL, STMT and NULL (that should be removed :)

@adambaratz
Copy link
Contributor Author

I'd be happy to make the change. I was trying to have it be similar to STR and INT, but agree more readable would be better.

@adambaratz
Copy link
Contributor Author

Regarding NULL, agree it should probably be removed. Probably would be a straightforward RFC. Will add that to my todo list. :)

@madorin
Copy link
Contributor

madorin commented May 17, 2017

Adam, what do you think on this? http://news.php.net/php.internals/99052
Posted, but no reaction at all :(
Who is the architector/staff board of PDO?

@cmb69
Copy link
Member

cmb69 commented Apr 26, 2019

@adambaratz Just a gentle reminder that the respective RFC claims to be under discussion, but apparently there has not been any discussion for roughly two years.

@adambaratz
Copy link
Contributor Author

Thanks for the nudge. I had abandoned this RFC because of the level of disagreement around it, but forgot to do this clean up.

@adambaratz adambaratz closed this May 7, 2019
@deAtog
Copy link

deAtog commented Sep 13, 2024

@cmb69 I'm not sure why this PR was closed. This would have been a welcomed improvement to PDO. For example, the following statement can only return a string, bool, or integer when it is executed.

Select :p0

In order to get other types, one has to explicitly cast the value to a FLOAT, DOUBLE, DECIMAL, etc. While this PR was only for FLOATs, it undoubtedly highlights the need for additional types in PDO.

@cmb69
Copy link
Member

cmb69 commented Sep 13, 2024

I'm not sure why this PR was closed.

The author withdrew the RFC, and accordingly closed this PR. From skimming the discussion, the controversial point was about fixed/numeric columns, which must not be handled as floating point values.

Anyhow, if you are interested in reviving this, please pursue the RFC process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants