diff options
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/databases/mysql.py | 20 | ||||
| -rw-r--r-- | lib/sqlalchemy/databases/sqlite.py | 3 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine.py | 2 |
3 files changed, 5 insertions, 20 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 9f8bb8a12..4e43f3673 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -100,14 +100,6 @@ class MySQLEngine(ansisql.ANSISQLEngine): def last_inserted_ids(self): return self.context.last_inserted_ids - def rowid_column_name(self): - """returns the ROWID column name for this engine.""" - - # well, for MySQL cant really count on this being there, surprise (not). - # so we do some silly hack down below in MySQLTableImpl to provide - # something for an OID column - return "_rowid" - def supports_sane_rowcount(self): return False @@ -153,17 +145,7 @@ class MySQLTableImpl(sql.TableImpl): """attached to a schema.Table to provide it with a Selectable interface as well as other functions """ - def _rowid_col(self): - if getattr(self, '_mysql_rowid_column', None) is None: - if len(self.table.primary_key) > 0: - c = self.table.primary_key[0] - else: - c = self.table.columns[self.table.columns.keys()[0]] - self._mysql_rowid_column = schema.Column(c.name, c.type, hidden=True) - self._mysql_rowid_column._set_parent(self.table) - - return self._mysql_rowid_column - rowid_column = property(lambda s: s._rowid_col()) + pass class MySQLCompiler(ansisql.ANSICompiler): def limit_clause(self, select): diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index 0288beae8..5a143a201 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -107,6 +107,9 @@ class SQLiteSQLEngine(ansisql.ANSISQLEngine): def last_inserted_ids(self): return self.context.last_inserted_ids + def rowid_column_name(self): + return "oid" + def connect_args(self): return ([self.filename], self.opts) diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py index 68cf08931..07574a260 100644 --- a/lib/sqlalchemy/engine.py +++ b/lib/sqlalchemy/engine.py @@ -260,7 +260,7 @@ class SQLEngine(schema.SchemaEngine): def rowid_column_name(self): """returns the ROWID column name for this engine, or None if the engine cant/wont support OID/ROWID.""" - return "oid" + return None def supports_sane_rowcount(self): """Provided to indicate when MySQL is being used, which does not have standard behavior |
