Skip to content

fix: serialize uint32 as JS numbers#3467

Closed
Weakky wants to merge 1 commit intomainfrom
fix/uint32-as-js-number
Closed

fix: serialize uint32 as JS numbers#3467
Weakky wants to merge 1 commit intomainfrom
fix/uint32-as-js-number

Conversation

@Weakky
Copy link
Contributor

@Weakky Weakky commented Dec 6, 2022

Overview

Follow-up PR to prisma/quaint#422

let val = match quaint_value {
Value::Int32(i) => i.map(|i| PrismaValue::Int(i as i64)).unwrap_or(PrismaValue::Null),
Value::Int64(i) => i.map(PrismaValue::Int).unwrap_or(PrismaValue::Null),
Value::UnsignedInt32(u) => u.map(|u| PrismaValue::Int(u as i64)).unwrap_or(PrismaValue::Null),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

94% of developers fix this issue

compiler-message: error[E0599]: no variant or associated item named UnsignedInt32 found for enum quaint::Value in the current scope
--> query-engine/connectors/sql-query-connector/src/value.rs:11:16
|
11 | Value::UnsignedInt32(u) => u.map(|u| PrismaValue::Int(u as i64)).unwrap_or(PrismaValue::Null),
| ^^^^^^^^^^^^^ variant or associated item not found in quaint::Value<'_>


ℹ️ Learn about @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

let type_name = match self {
quaint::Value::Int32(_) => "int",
quaint::Value::Int64(_) => "bigint",
quaint::Value::UnsignedInt32(_) => "uint32",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

94% of developers fix this issue

compiler-message: error[E0599]: no variant or associated item named UnsignedInt32 found for enum quaint::Value in the current scope
--> query-engine/connectors/sql-query-connector/src/value_ext.rs:17:28
|
17 | quaint::Value::UnsignedInt32(_) => "uint32",
| ^^^^^^^^^^^^^ variant or associated item not found in quaint::Value<'_>


ℹ️ Learn about @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@janpio janpio requested a review from a team as a code owner June 14, 2023 10:52
@jacek-prisma jacek-prisma deleted the fix/uint32-as-js-number branch October 10, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants