Browse Source

[#63] Change in the new of the foreign key generator

Roland Haroutiounian 9 years ago
parent
commit
6f06c86a86
2 changed files with 4 additions and 1 deletions
  1. 3
    1
      DataSource/MySQL/MySQL.py
  2. 1
    0
      leobject/datasources/ledatasourcesql.py

+ 3
- 1
DataSource/MySQL/MySQL.py View File

2
 
2
 
3
 
3
 
4
 import EditorialModel
4
 import EditorialModel
5
+import pymysql
6
+
5
 
7
 
6
 ## @brief Manages the accesses to a MySQL datasource
8
 ## @brief Manages the accesses to a MySQL datasource
7
 class MySQL(object):
9
 class MySQL(object):
42
     # @param src_table_name str
44
     # @param src_table_name str
43
     # @param dst_table_name str
45
     # @param dst_table_name str
44
     # @return str
46
     # @return str
45
-    def _fk_name(cls, src_table_name, dst_table_name):
47
+    def get_fk_name(cls, src_table_name, dst_table_name):
46
         return "fk_%s_%s" % (src_table_name, dst_table_name)
48
         return "fk_%s_%s" % (src_table_name, dst_table_name)
47
 
49
 
48
     @classmethod
50
     @classmethod

+ 1
- 0
leobject/datasources/ledatasourcesql.py View File

9
 from mosql.query import select, insert, update, delete, join
9
 from mosql.query import select, insert, update, delete, join
10
 from mosql.util import raw
10
 from mosql.util import raw
11
 import mosql.mysql
11
 import mosql.mysql
12
+from DataSource.MySQL.MySQL import MySQL
12
 
13
 
13
 ## MySQL DataSource for LeObject
14
 ## MySQL DataSource for LeObject
14
 class LeDataSourceSQL(DummyDatasource):
15
 class LeDataSourceSQL(DummyDatasource):

Loading…
Cancel
Save