diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-06-06 00:11:54 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-06-06 00:11:54 +0000 |
commit | bdb41655d14caed41e93225f79e5554925a15e20 (patch) | |
tree | 7e7ecf0d0dfb59b14bc34f77c5ae29e37f9f1755 /lib/sqlalchemy/databases/firebird.py | |
parent | e69fa9c45d77b2c27311d54155c78ee44ce551f9 (diff) | |
download | sqlalchemy-bdb41655d14caed41e93225f79e5554925a15e20.tar.gz |
added "NonExistentTable" exception throw to reflection, courtesy lbruno@republico.estv.ipv.pt, for [ticket:138]
Diffstat (limited to 'lib/sqlalchemy/databases/firebird.py')
-rw-r--r-- | lib/sqlalchemy/databases/firebird.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/databases/firebird.py b/lib/sqlalchemy/databases/firebird.py index b25d62c2d..3eb287d9c 100644 --- a/lib/sqlalchemy/databases/firebird.py +++ b/lib/sqlalchemy/databases/firebird.py @@ -195,9 +195,11 @@ class FireBirdDialect(ansisql.ANSIDialect): #import pdb;pdb.set_trace() # get all of the fields for this table c = connection.execute(tblqry, [table.name.upper()]) + found_table = False while True: row = c.fetchone() if not row: break + found_table = True args = [row['FNAME']] kw = {} # get the data types and lengths @@ -208,6 +210,9 @@ class FireBirdDialect(ansisql.ANSIDialect): # is it a primary key? table.append_item(schema.Column(*args, **kw)) # does the field have indexes + + if not found_table: + raise exceptions.NoSuchTableError(table.name) def last_inserted_ids(self): return self.context.last_inserted_ids |