Skip to content

Commit 7af4073

Browse files
gordthompsonrafiss
authored andcommitted
Remove SHOW COLUMNS code for very old versions
1 parent f76a452 commit 7af4073

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

sqlalchemy_cockroachdb/base.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,7 @@ def has_table(self, conn, table, schema=None):
190190
# correlated subqueries which are not yet supported.
191191
def get_columns(self, conn, table_name, schema=None, **kw):
192192
_include_hidden = kw.get("include_hidden", False)
193-
if not self._is_v2plus:
194-
# v1.1.
195-
# Bad: the table name is not properly escaped.
196-
# Oh well. Hoping 1.1 won't be around for long.
197-
rows = conn.execute(
198-
text(f'SHOW COLUMNS FROM "{schema or self.default_schema_name}"."{table_name}"')
199-
)
200-
elif not self._is_v191plus:
193+
if not self._is_v191plus:
201194
# v2.x does not have is_generated or generation_expression
202195
sql = (
203196
"SELECT column_name, data_type, is_nullable::bool, column_default, "

0 commit comments

Comments
 (0)