SQLAlchemy Boolean Vs BOOLEAN
I can see that BOOLEAN overrides __visit_name__ class BOOLEAN(Boolean): __visit_name__ = 'BOOLEAN' that controls visitor's method chosen by the dispatcher def _compiler_dispa
Solution 1:
Boolean is a generic type:
Generic types specify a column that can read, write and store a particular type of Python data. SQLAlchemy will choose the best database column type available on the target database when issuing a
CREATE TABLEstatement.
This category of types refers to types that are either part of the SQL standard, or are potentially found within a subset of database backends. Unlike the “generic” types, the SQL standard/multi-vendor types have no guarantee of working on all backends, and will only work on those backends that explicitly support them by name. That is, the type will always emit its exact name in DDL with
CREATE TABLEis issued.
There's no inconsistency, because they're different things.
Post a Comment for "SQLAlchemy Boolean Vs BOOLEAN"