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

Adding support for Array(Float64) #443

Merged
merged 2 commits into from
Aug 22, 2020
Merged

Adding support for Array(Float64) #443

merged 2 commits into from
Aug 22, 2020

Conversation

jwoertink
Copy link
Member

Fixes #382

This adds in the Array(Float64) support with some specs and some cleanups.

macro setup_db_mapping(columns, *args, **named_args)
DB.mapping({
{% for column in columns %}
{{column[:name]}}: {
{% if column[:type].id == Float64.id %}
type: PG::Numeric,
convertor: Float64Converter,
Copy link
Member Author

Choose a reason for hiding this comment

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

This is actually misspelled which means we were never using it. Changing the spelling to converter makes the specs fail as mentioned in #437 but it turns out we actually handle the casting ourselves in the charm extensions.

Copy link
Member

@matthewmcgarvey matthewmcgarvey left a comment

Choose a reason for hiding this comment

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

Nice 👍

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

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

Nice catch, and LGTM!!

@jwoertink jwoertink merged commit 5e94a19 into master Aug 22, 2020
@jwoertink jwoertink deleted the issues/382 branch August 22, 2020 16:48
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.

Supporting Array(Float64)
3 participants