Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Visitor should never panic. #146

Merged
merged 1 commit into from
Jun 19, 2020
Merged

Visitor should never panic. #146

merged 1 commit into from
Jun 19, 2020

Conversation

@pimeys pimeys self-assigned this Jun 18, 2020
@pimeys pimeys added the kind/improvement An improvement to existing feature and code. label Jun 18, 2020
@pimeys pimeys added this to the 2.1.0 milestone Jun 18, 2020
@pimeys pimeys linked an issue Jun 18, 2020 that may be closed by this pull request
Copy link
Contributor

@tomhoule tomhoule left a comment

Choose a reason for hiding this comment

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

Looks good! Feel free to ignore the comments if these panics are not in scope for this PR.

src/connector/mysql/conversion.rs Outdated Show resolved Hide resolved
src/connector/mysql/conversion.rs Outdated Show resolved Hide resolved
src/visitor/sqlite.rs Outdated Show resolved Hide resolved
src/visitor/mysql.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@tomhoule tomhoule left a comment

Choose a reason for hiding this comment

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

I like the new conversions much better!

Err(Error::builder(kind).build())?
}
None => Value::Integer(None),
},
Copy link
Contributor

Choose a reason for hiding this comment

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

much better!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Not perfect, but at least better...

fn is_json(&self) -> bool;
fn is_enum(&self) -> bool;
fn is_null(&self) -> bool;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to use these with pg, but it doesn't really fit there that well...

@pimeys pimeys merged commit 0e8990a into master Jun 19, 2020
@pimeys pimeys deleted the remove-visitor-panics branch June 19, 2020 14:06
pimeys pushed a commit to prisma/prisma-engines that referenced this pull request Jun 19, 2020
pimeys pushed a commit to prisma/prisma-engines that referenced this pull request Jun 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/improvement An improvement to existing feature and code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removal of panics
2 participants