Skip to content

fix: serialize uint32 as JS numbers #3467

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Weakky
Copy link
Contributor

@Weakky Weakky commented Dec 6, 2022

Overview

Follow-up PR to prisma/quaint#422

@@ -8,6 +8,7 @@
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 ]

@@ -14,6 +14,7 @@
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
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.

1 participant