Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Casting resultset to native PHP types #18

Merged
merged 1 commit into from
May 13, 2020

Conversation

codercms
Copy link
Collaborator

@codercms codercms commented Apr 4, 2020

According to this PR - php/php-src#4939

According to this PR - php/php-src#4939
@codercms codercms changed the title Native type casting Casting resultset to native PHP types Apr 4, 2020
@codercms
Copy link
Collaborator Author

codercms commented May 7, 2020

@twose could you review this PR?
This PR makes Postgres Client to return values in native PHP types instead of only strings.

@twose
Copy link
Member

twose commented May 8, 2020

@yunnian is the author of ext-PostgreSQL

and call @matyhtf and @huanghantao too

anyway, it looks good to me, thank you for your contribution

@yunnian
Copy link
Contributor

yunnian commented May 8, 2020

Let's discuss whether it's better to add an option, such as:

$mysqli->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, 1);

@codercms
Copy link
Collaborator Author

codercms commented May 8, 2020

@yunnian do we have any reasons to add custom parameter that toggles float/int conversion?
P.S. Perhaps we can add custom parameter that will toggle casting from PostgreSQL types to PHP native types.

@yunnian yunnian merged commit ee209e0 into swoole:v4.4.x May 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants