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

[feature] return a scalar value instead of a buffer for bit fields, such as Byte. #277

Closed
underbell opened this issue Jun 24, 2024 · 3 comments · Fixed by #286
Closed

[feature] return a scalar value instead of a buffer for bit fields, such as Byte. #277

underbell opened this issue Jun 24, 2024 · 3 comments · Fixed by #286
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@underbell
Copy link

underbell commented Jun 24, 2024

Is your feature request related to a problem? Please describe.
r2dbc has ConverterNotFoundException [java.nio.HeapByteBuffer] to type [java.lang.Boolean] on boot 3.3.0
spring-projects/spring-data-relational#1824

Describe the solution you'd like
return a scalar value instead of a buffer for bit fields, such as Byte.

Additional context
spring-projects/spring-data-relational#1824 (comment)

@underbell underbell changed the title [feature] returning a byte buffer instead of a single byte for BIT fields. [feature] return a scalar value instead of a buffer for bit fields, such as Byte. Jun 24, 2024
@jchrys jchrys self-assigned this Jul 23, 2024
@jchrys jchrys added need-triage need-triage bug Something isn't working and removed need-triage need-triage labels Jul 23, 2024
@jchrys
Copy link
Collaborator

jchrys commented Jul 23, 2024

@underbell
Thanks for reporting :D

@jchrys
Copy link
Collaborator

jchrys commented Jul 24, 2024

BIT(1) is should be represented as java.lang.Boolean just like mysql connector-j's implementation.

@jchrys jchrys added enhancement New feature or request and removed bug Something isn't working labels Jul 24, 2024
@jchrys jchrys added this to the 1.2.0 milestone Jul 24, 2024
jchrys added a commit that referenced this issue Jul 28, 2024
Motivation:
Currently, the R2DBC MySQL connector does not  support the `tinyInt1isBit` MySQL parameter.

Modifications:
Updated the mapping of `TINYINT(1)` or `BIT(1)` values to boolean based on the `tinyInt1isBit` parameter.

Result:
Properly supports the `tinyInt1isBit` parameter.
Resolves #277
@jchrys jchrys mentioned this issue Jul 28, 2024
4 tasks
jchrys added a commit that referenced this issue Jul 28, 2024
Motivation:
Currently, the R2DBC MySQL connector does not  support the `tinyInt1isBit` MySQL parameter.

Modifications:
Updated the mapping of `TINYINT(1)` or `BIT(1)` values to boolean based on the `tinyInt1isBit` parameter.

Result:
Properly supports the `tinyInt1isBit` parameter.
Resolves #277
jchrys added a commit that referenced this issue Jul 28, 2024
Motivation:
Currently, the R2DBC MySQL connector does not  support the `tinyInt1isBit` MySQL parameter.

Modifications:
Updated the mapping of `TINYINT(1)` or `BIT(1)` values to boolean based on the `tinyInt1isBit` parameter.

Result:
Properly supports the `tinyInt1isBit` parameter.
Resolves #277
@jchrys jchrys modified the milestones: Next, 1.3.0 Jul 29, 2024
jchrys added a commit that referenced this issue Aug 3, 2024
Motivation:
BIT(1) should be treated as `Boolean`.

Modification:
set `Boolean.class` as `BIT(1)'s default java type.

Result:
Ensures `BIT(1)`` is handled as `Boolean` by default. like mysql-connector-j's implementation.
Resolves #277
jchrys added a commit that referenced this issue Aug 3, 2024
Motivation:
BIT(1) should be treated as `Boolean`.

Modification:
set `Boolean.class` as the default java type for `BIT(1)`.

Result:
Ensures that `BIT(1)` is handled as `Boolean` by default, similar to the implementation in MySQL Connector/j.
Resolves #277
jchrys added a commit that referenced this issue Aug 3, 2024
Motivation:
BIT(1) should be treated as `Boolean`.

Modification:
set `Boolean.class` as the default java type for `BIT(1)`.

Result:
Ensures that `BIT(1)` is handled as `Boolean` by default, similar to the implementation in MySQL Connector/j.
Resolves #277
jchrys added a commit that referenced this issue Aug 4, 2024
Motivation:
BIT(1) should be treated as `Boolean`.

Modification:
set `Boolean.class` as `BIT(1)'s default java type.

Result:
Ensures `BIT(1)` is handled as `Boolean` by default. like
mysql-connector-j's implementation.
Resolves #277
@jchrys
Copy link
Collaborator

jchrys commented Aug 5, 2024

ref https://docs.oracle.com/cd/E17952_01/connector-j-en/connector-j-reference-type-conversions.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants