Skip to content
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

[MySQLi] Convert private property Statement::$paramTypeMap to class constant PARAM_TYPE_MAP #6004

Merged
merged 1 commit into from Apr 18, 2023

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Apr 12, 2023

Q A
Type improvement
Fixed issues n/a

Summary

Follows #6003.

This change makes this mapping consistent with what we have for PDO and SQLite3:

private const PARAM_TYPE_MAP = [
ParameterType::NULL => PDO::PARAM_NULL,
ParameterType::INTEGER => PDO::PARAM_INT,
ParameterType::STRING => PDO::PARAM_STR,
ParameterType::ASCII => PDO::PARAM_STR,
ParameterType::BINARY => PDO::PARAM_LOB,
ParameterType::LARGE_OBJECT => PDO::PARAM_LOB,
ParameterType::BOOLEAN => PDO::PARAM_BOOL,
];

private const PARAM_TYPE_MAP = [
ParameterType::NULL => SQLITE3_NULL,
ParameterType::INTEGER => SQLITE3_INTEGER,
ParameterType::STRING => SQLITE3_TEXT,
ParameterType::ASCII => SQLITE3_TEXT,
ParameterType::BINARY => SQLITE3_BLOB,
ParameterType::LARGE_OBJECT => SQLITE3_BLOB,
ParameterType::BOOLEAN => SQLITE3_INTEGER,
];

@phansys phansys marked this pull request as ready for review April 12, 2023 01:00
src/Driver/Mysqli/Statement.php Outdated Show resolved Hide resolved
src/Driver/Mysqli/Statement.php Outdated Show resolved Hide resolved
@derrabus derrabus added this to the 3.7.0 milestone Apr 18, 2023
@derrabus derrabus merged commit 1265f8c into doctrine:3.7.x Apr 18, 2023
72 checks passed
@phansys phansys deleted the mysqli_statement branch April 18, 2023 09:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants