#1148 new
cdinger (at gmail)

quote_name doesn't allow cross-database table names

Reported by cdinger (at gmail) | December 7th, 2009 @ 09:45 PM

The quote_name method in the MySQL adapter doesn't allow you to define a DataMapper resource that uses a table in another database. For example, it's impossible to do:

storage_names[:default] = 'some_schema.table_name'

because quote_name produces some_schema.table_name instead of some_schema.table_name

This is useful for pulling in legacy data from other schemas.

Since MySQL never allows periods in database object names (http://dev.mysql.com/doc/refman/5.0/en/identifiers.html), the following patch seems perfectly safe:

http://github.com/cdinger/dm-core/commit/4ccb3a7a08423c67c626c35719...

Thanks for considering!

Chris

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages