summaryrefslogtreecommitdiff
path: root/odb/relational/mysql
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-12-12 11:26:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-12-12 11:26:44 +0200
commita5f24411433aeb61ad015129354a664820affab0 (patch)
tree25fb5a97c0c070b78c9318f1da3dcbc484785918 /odb/relational/mysql
parent2ad2e5500dd075db421a516502c9e522fdc34ee0 (diff)
Add support for SQL name transformations
Diffstat (limited to 'odb/relational/mysql')
-rw-r--r--odb/relational/mysql/context.cxx2
-rw-r--r--odb/relational/mysql/schema.cxx12
2 files changed, 2 insertions, 12 deletions
diff --git a/odb/relational/mysql/context.cxx b/odb/relational/mysql/context.cxx
index 8bf700e..ba22733 100644
--- a/odb/relational/mysql/context.cxx
+++ b/odb/relational/mysql/context.cxx
@@ -84,6 +84,8 @@ namespace relational
insert_send_auto_id = true;
delay_freeing_statement_result = false;
need_image_clone = false;
+ global_index = false;
+ global_fkey = true;
data_->bind_vector_ = "MYSQL_BIND*";
data_->truncated_vector_ = "my_bool*";
diff --git a/odb/relational/mysql/schema.cxx b/odb/relational/mysql/schema.cxx
index 8068fc4..5b34cfa 100644
--- a/odb/relational/mysql/schema.cxx
+++ b/odb/relational/mysql/schema.cxx
@@ -86,18 +86,6 @@ namespace relational
base::traverse (fk);
}
- virtual string
- name (sema_rel::foreign_key& fk)
- {
- // In MySQL, foreign key names are database-global. Make them
- // unique by prefixing the key name with table name. Note,
- // however, that they cannot be prefixed with the database name.
- //
- return quote_id (
- static_cast<sema_rel::table&> (fk.scope ()).name ().uname ()
- + "_" + fk.name ());
- }
-
virtual void
deferred ()
{