class PGMacAddr(sqltypes.TypeEngine):
__visit_name__ = "MACADDR"
-class PGBigInteger(sqltypes.Integer):
- __visit_name__ = "BIGINT"
-
class PGInterval(sqltypes.TypeEngine):
__visit_name__ = 'INTERVAL'
ischema_names = {
'integer' : sqltypes.INTEGER,
- 'bigint' : PGBigInteger,
+ 'bigint' : sqltypes.BigInteger,
'smallint' : sqltypes.SMALLINT,
'character varying' : sqltypes.VARCHAR,
'character' : sqltypes.CHAR,
isinstance(column.type, sqltypes.Integer) and \
not isinstance(column.type, sqltypes.SmallInteger) and \
(column.default is None or (isinstance(column.default, schema.Sequence) and column.default.optional)):
- if isinstance(column.type, PGBigInteger):
+ if isinstance(column.type, sqltypes.BigInteger):
colspec += " BIGSERIAL"
else:
colspec += " SERIAL"
def visit_INTERVAL(self, type_):
return "INTERVAL"
- def visit_BINARY(self, type_):
+ def visit_binary(self, type_):
+ return self.visit_BYTEA(type_)
+
+ def visit_BYTEA(self, type_):
return "BYTEA"
def visit_ARRAY(self, type_):
b. Specifying types that are entirely specific to the database
in use and have no analogue in the sqlalchemy.types package.
+ c. Specifying types where there is an analogue in sqlalchemy.types,
+ but the database in use takes vendor-specific flags for those
+ types.
+
2. the TypeEngine classes are *no longer* used for:
a. generating DDL
_is_excluded('yikesdb', 'in', ((0, 3, 'alpha2'), (0, 3, 'alpha3')))
"""
- spec = db_spec(db)
+ vendor_spec = db_spec(db)
- if not spec(config.db):
+ if not vendor_spec(config.db):
return False
version = _server_version()