On Saturday, August 25, 2018 at 10:15:56 PM UTC-7, Greg Gilbert wrote:
>
> Hey,
>
> I was wondering what the support is for the POINT column type in 
> MySQL/MariaDB. I see one or two places in the code where it's mentioned 
> (spec/adapters/mysql_spec.rb, spec/core/schema_spec.rb) but I don't see any 
> mention of it in the documentation. If it is supported, what's the best way 
> to use it?
>
> Also, side question regarding GeoJSON: any plans to support that as a 
> extension? Right now I'm just doing this, and while it's fine, it could be 
> better:
>
>   def location=(data)
>     @values[:location] = {
>       type: 'Point',
>       coordinates: [data[0], data[1]]
>     }.to_json
>   end
>
> I'd consider building my own extension for it. Aside from the doc at 
> sequel/doc/extensions.rdoc, is there a good example in the code to follow?
>

There isn't any specific support for the point type. The point usage in the 
specs just relies on the default behavior of method_missing defining a 
column with that type.  The MySQL adapter spec that uses point is testing 
spatial index creation, not the point type.  You probably should work on 
your own extension if you plan to use it.  You probably want to look at 
some of the pg_* extensions that add support for more advanced PostgreSQL 
types, as I'm guessing the situation with MySQL's point will be similar.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to