all_cols.c.column_name,
all_cols.c.data_type,
all_cols.c.char_length,
+ all_cols.c.data_length,
all_cols.c.data_precision,
all_cols.c.data_scale,
all_cols.c.nullable,
elif coltype in ("VARCHAR2", "NVARCHAR2", "CHAR", "NCHAR"):
char_length = maybe_int(row_dict["char_length"])
coltype = self.ischema_names.get(coltype)(char_length)
+ elif coltype == "RAW":
+ data_length = maybe_int(row_dict["data_length"])
+ coltype = RAW(data_length)
elif "WITH TIME ZONE" in coltype:
coltype = TIMESTAMP(timezone=True)
elif "WITH LOCAL TIME ZONE" in coltype:
]
self._run_test(metadata, connection, specs, ["length"])
- @testing.combinations(ROWID(), RAW(1), argnames="type_")
- def test_misc_types(self, metadata, connection, type_):
- t = Table("t1", metadata, Column("x", type_))
+ def test_rowid_type(self, metadata, connection):
+ self._run_test(metadata, connection, [(ROWID(), ROWID())], [])
- t.create(connection)
-
- eq_(
- inspect(connection).get_columns("t1")[0]["type"]._type_affinity,
- type_._type_affinity,
- )
+ def test_raw_type(self, metadata, connection):
+ """Test that RAW columns preserve data_length on reflection."""
+ specs = [
+ (RAW(50), RAW(50)),
+ (RAW(128), RAW(128)),
+ ]
+ self._run_test(metadata, connection, specs, ["length"])
class IdentityReflectionTest(fixtures.TablesTest):