diff options
author | Noufal Ibrahim <noufal@nibrahim.net.in> | 2013-12-05 17:36:57 +0530 |
---|---|---|
committer | Noufal Ibrahim <noufal@nibrahim.net.in> | 2013-12-10 00:58:09 +0530 |
commit | 96359c6f3e81f55275666e94d9b9cadb7a1d923e (patch) | |
tree | 01882ceeff25a976dabcced7fb52193a0249d024 /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | be1251c625b7444248003ddcc930a3be0db9dd56 (diff) | |
download | sqlalchemy-96359c6f3e81f55275666e94d9b9cadb7a1d923e.tar.gz |
Implements TSVECTOR type for postgresql.
Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index b80f269c1..5ef16c412 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -368,6 +368,10 @@ class UUID(sqltypes.TypeEngine): PGUuid = UUID +class TSVECTOR(sqltypes.TypeEngine): + __visit_name__ = 'TSVECTOR' + + class _Slice(expression.ColumnElement): __visit_name__ = 'slice' @@ -1163,6 +1167,9 @@ class PGDDLCompiler(compiler.DDLCompiler): class PGTypeCompiler(compiler.GenericTypeCompiler): + def visit_TSVECTOR(self, type): + return "TSVECTOR" + def visit_INET(self, type_): return "INET" |