Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ibm_db_sa/reflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def get_schema_names(self, connection, **kw):
query = sql.select(sysschema.c.schemaname).\
where(not_(sysschema.c.schemaname.like('SYS%'))).\
order_by(sysschema.c.schemaname)
return [self.normalize_name(r[0]) for r in connection.execute(query)]
return [self.normalize_name(r[0].rstrip()) for r in connection.execute(query)]

@reflection.cache
def get_table_names(self, connection, schema=None, **kw):
Expand Down Expand Up @@ -640,7 +640,7 @@ def get_schema_names(self, connection, **kw):
where(~sysschema.c.schemaname.like(str('Q%'))). \
where(~sysschema.c.schemaname.like(str('SYS%'))). \
order_by(sysschema.c.schemaname)
return [self.normalize_name(r[0]) for r in connection.execute(query)]
return [self.normalize_name(r[0].rstrip()) for r in connection.execute(query)]

# Retrieves a list of table names for a given schema
@reflection.cache
Expand Down Expand Up @@ -990,7 +990,7 @@ def get_schema_names(self, connection, **kw):
query = sql.select(sysschema.c.tabschema).\
where(not_(sysschema.c.tabschema.like('SYS%'))).\
distinct(sysschema.c.tabschema)
return [self.normalize_name(r[0]) for r in connection.execute(query)]
return [self.normalize_name(r[0].rstrip()) for r in connection.execute(query)]

def get_table_comment(self, connection, table_name, schema=None, **kw):
raise NotImplementedError()
Expand Down