|
@@ -47,11 +47,11 @@ class Em_Field_Type(object):
|
47
|
47
|
'field_id': em_field.uid
|
48
|
48
|
}
|
49
|
49
|
|
50
|
|
- created_relation = Em_Field_Type._createDb(**values)
|
|
50
|
+ created_relation = Em_Field_Type._create_db(**values)
|
51
|
51
|
return created_relation
|
52
|
52
|
|
53
|
53
|
@classmethod
|
54
|
|
- def _createDb(cls, **kwargs):
|
|
54
|
+ def _create_db(cls, **kwargs):
|
55
|
55
|
dbe = EmComponent.db_engine()
|
56
|
56
|
conn = dbe.connect()
|
57
|
57
|
table = sqla.Table(cls.table, sqlutils.meta(dbe))
|
|
@@ -66,9 +66,9 @@ class Em_Field_Type(object):
|
66
|
66
|
#
|
67
|
67
|
# @return Boolean
|
68
|
68
|
def delete(self):
|
69
|
|
- return self._deleteDb()
|
|
69
|
+ return self._delete_db()
|
70
|
70
|
|
71
|
|
- def _deleteDb(self):
|
|
71
|
+ def _delete_db(self):
|
72
|
72
|
dbe = EmComponent.db_engine()
|
73
|
73
|
table = sqla.Table(self.table, sqlutils.meta(dbe))
|
74
|
74
|
req = table.delete().where(table.c.type_id == self.type_id).where(table.c.field_id == self.field_id)
|
|
@@ -88,14 +88,14 @@ class Em_Field_Type(object):
|
88
|
88
|
#
|
89
|
89
|
# @return True if success, False if failure
|
90
|
90
|
def exists(self):
|
91
|
|
- return self._existsDb()
|
|
91
|
+ return self._exists_db()
|
92
|
92
|
|
93
|
93
|
## _ExistsDb (Function)
|
94
|
94
|
#
|
95
|
95
|
# Queries the database to see if a relation exists or not
|
96
|
96
|
#
|
97
|
97
|
# @return True if success, False if failure
|
98
|
|
- def _existsDb(self):
|
|
98
|
+ def _exists_db(self):
|
99
|
99
|
dbe = EmComponent.db_engine()
|
100
|
100
|
table = sqla.Table(self.table, sqlutils.meta(dbe))
|
101
|
101
|
req = table.select().where(table.c.type_id == self.type_id).where(table.c.field_id == self.field_id)
|