Skip to content

support unsigned int type#2459

Closed
garrensmith wants to merge 1 commit intomainfrom
unsigned-integer-support
Closed

support unsigned int type#2459
garrensmith wants to merge 1 commit intomainfrom
unsigned-integer-support

Conversation

@garrensmith
Copy link
Contributor

@garrensmith garrensmith commented Dec 1, 2021

this work is based off the work in the quaint project prisma/quaint#335
It is not ready to be merged until the quaint PR has been merged.

At this stage we don't really support unsigned integers so we try and convert it to a signed int. An error is returned if that fails.

Copy link
Contributor

@pimeys pimeys left a comment

Choose a reason for hiding this comment

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

Some validation of input values, so fail gracefully if giving negative values from the client.

opt-level = 'z' # Optimize for size.
#strip="symbols"

[patch."https://github.com/prisma/quaint"]
Copy link
Contributor

Choose a reason for hiding this comment

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

reminder to remove this before merging

PrismaValue::Float(value) => ast::Expression::NumericValue(value.to_string(), ast::Span::empty()),
PrismaValue::Int(value) => ast::Expression::NumericValue(value.to_string(), ast::Span::empty()),
PrismaValue::BigInt(value) => ast::Expression::NumericValue(value.to_string(), ast::Span::empty()),
PrismaValue::UnsignedInt(value) => ast::Expression::NumericValue(value.to_string(), ast::Span::empty()),
Copy link
Contributor

Choose a reason for hiding this comment

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

UInt, but choose whatever you wish.

@garrensmith garrensmith force-pushed the unsigned-integer-support branch from 68d22eb to 7c4f5e7 Compare December 3, 2021 12:57
@dpetrick
Copy link
Contributor

dpetrick commented Dec 3, 2021

Some validation of input values, so fail gracefully if giving negative values from the client.

The QE has no idea about native types, we can't validate that.

@do4gr do4gr closed this Aug 18, 2022
@janpio janpio deleted the unsigned-integer-support branch November 15, 2023 19:27
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.

4 participants