On Aug 2, 1:27 am, kez <[email protected]> wrote: > Hello - > > I have a spatially enabled MySQL table with a POINT column storing my > geometries. > > In order to add a spatial index, the geometry column must be NOT NULL. > However, MySQL does not seem to allow setting DEFAULT values for geometry > columns, so I am in a position where I cannot have an index and insert new > rows, as Sequel does not support any spatial data types.
There definitely is a way to do this with Sequel. If you can give an example of the SQL you want to use, I can show you how. > I am considering dropping the index before insert, then run an UPDATE > statement to convert WKT spatial data into MySQL spatial data, then put the > index back on...which is obviously bit convoluted. Alternatively I could > just send a CREATE statement via Sequel, but this loses much of the ORM > advantage of using Sequel in the first place! True. The more database specific syntax you use, the more likely you are to have to drop down to SQL to solve it. However, you shouldn't need to drop your indexes and then add them back (though that can be faster if you are inserting a large number of rows). Anyway, it's hard to provide more specific advice until you post the SQL code you would like to use. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
