summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorCleber J Santos <cleber@cleberjsantos.com.br>2017-11-15 18:09:23 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2017-11-16 09:27:58 -0500
commitda8ff6a7d896cf5bccf52160bff6b4d91b5d186d (patch)
treeb38d4c3e3ee0859ca60550f609be224b5bd07aec /lib/sqlalchemy/dialects/postgresql/base.py
parent63ea6ef4fb0b1835f65623c1887fd49e99155bbf (diff)
downloadsqlalchemy-da8ff6a7d896cf5bccf52160bff6b4d91b5d186d.tar.gz
Add postgresql.MONEY
Change-Id: I2b40faf583a84bc5b416e1ad3aa812896ea67a8c Pull-request: https://github.com/zzzeek/sqlalchemy/pull/395
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 641c62a6a..32de7861a 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -973,6 +973,16 @@ class MACADDR(sqltypes.TypeEngine):
PGMacAddr = MACADDR
+class MONEY(sqltypes.TypeEngine):
+
+ """Provide the PostgreSQL MONEY type.
+
+ .. versionadded:: 1.2
+
+ """
+ __visit_name__ = "MONEY"
+
+
class OID(sqltypes.TypeEngine):
"""Provide the PostgreSQL OID type.
@@ -1362,6 +1372,7 @@ ischema_names = {
'bit': BIT,
'bit varying': BIT,
'macaddr': MACADDR,
+ 'money': MONEY,
'oid': OID,
'double precision': DOUBLE_PRECISION,
'timestamp': TIMESTAMP,
@@ -1831,6 +1842,9 @@ class PGTypeCompiler(compiler.GenericTypeCompiler):
def visit_MACADDR(self, type_, **kw):
return "MACADDR"
+ def visit_MONEY(self, type_, **kw):
+ return "MONEY"
+
def visit_OID(self, type_, **kw):
return "OID"