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

[inferrer] Add support for "line" and "circle" PG types #141

Closed
solnic opened this issue Jan 30, 2017 · 2 comments · Fixed by #149
Closed

[inferrer] Add support for "line" and "circle" PG types #141

solnic opened this issue Jan 30, 2017 · 2 comments · Fixed by #149

Comments

@solnic
Copy link
Member

solnic commented Jan 30, 2017

Hanami model expects that line and circle PG types can be automatically inferred, so it would be nice if we could have that supported by PG inferrer.

Here's what Sequel gives us about these types:

# "line"
[:geometric1, {:oid=>600, :db_type=>"point", :default=>nil, :allow_null=>true, :primary_key=>false, :type=>nil, :ruby_default=>nil}]

# circle
[:geometric3, {:oid=>718, :db_type=>"circle", :default=>"'<(15,15),1>'::circle", :allow_null=>true, :primary_key=>false, :type=>nil, :ruby_default=>nil}]

Refs hanami/model#370

@flash-gordon
Copy link
Member

It makes sense to add support for the rest of PG geometric datatypes https://www.postgresql.org/docs/9.6/static/datatype-geometric.html

The whole list would be

  • point
  • line
  • circle
  • lseg
  • box
  • path (closed and open)
  • polygon

@Morozzzko
Copy link
Contributor

I'll check this out. Probably gonna have something by the end of the week (Feb 04-05)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants