UserDefinedType
is a class within the sqlalchemy.types
module of the SQLAlchemy project.
BOOLEAN,
Boolean,
DATE,
DATETIME,
Date,
DateTime,
Enum,
FLOAT,
Float,
INTEGER,
Integer,
Interval,
NULLTYPE,
NullType,
String,
TEXT,
TIME,
Text,
Time,
TypeEngine,
and to_instance
are several other callables with code examples from the same sqlalchemy.types
package.
GeoAlchemy2 (project documentation and PyPI package information) extends SQLAlchemy with new data types for working with geospatial databases, particularly PostGIS, which is a spatial database extender for PostgreSQL. The project is provided as open source under the MIT license.
GeoAlchemy2 / geoalchemy2 / comparator.py
# comparator.py
from sqlalchemy import types as sqltypes
from sqlalchemy.types import UserDefinedType
from sqlalchemy.dialects.postgresql import DOUBLE_PRECISION
from sqlalchemy.sql import operators
try:
from sqlalchemy.sql.functions import _FunctionGenerator
except ImportError: # SQLA < 0.9 # pragma: no cover
from sqlalchemy.sql.expression import _FunctionGenerator
INTERSECTS = operators.custom_op('&&')
OVERLAPS_OR_TO_LEFT = operators.custom_op('&<')
OVERLAPS_OR_TO_RIGHT = operators.custom_op('&>')
OVERLAPS_OR_BELOW = operators.custom_op('&<|')
TO_LEFT = operators.custom_op('<<')
BELOW = operators.custom_op('<<|')
TO_RIGHT = operators.custom_op('>>')
CONTAINED = operators.custom_op('@')
OVERLAPS_OR_ABOVE = operators.custom_op('|&>')
ABOVE = operators.custom_op('|>>')
CONTAINS = operators.custom_op('-')
SAME = operators.custom_op('-=')
DISTANCE_CENTROID = operators.custom_op('<->')
DISTANCE_BOX = operators.custom_op('<#>')
## ... source file continues with no further UserDefinedType examples...