Humn, good question
i guess from my own scenario and extrapolating a little if there was
something like
def self.create(adapter, table, column, options)
case adapter
when :postgresql
[:after, "SELECT AddGeometryColumn(table, column......);"]
when :mysql
[:inline, "#{column} GEOMETRY #{options[:nullable]}"]
when :sqlite
raise Exception.new "are you insane?"
end
end
there'd obviously be a heck of alot of plumping around this (i'm
thinking dm-migration) too though which I haven't looked at!
What you think?
On Jan 13, 3:54 pm, Michael Klishin <[email protected]>
wrote:
> On 13.01.2009, at 18:30, heda wrote:
>
> > Pretty much georuby will do the trick, but i'd really like to be able
> > to define it in a model as say
>
> > property :boundary, Polygon
>
> > and hook into auto_migrate! so that it issues the correct
>
> > SELECT AddGeometryColumn(.......);
>
> ah, that's what you mean. Yeah, currently types only give you means to
> define how dumping and loading works.
>
> Can you think of a good solution to this? It is definitely an addition
> worth having.
>
> MK
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---