diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-17 17:29:35 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-17 17:29:35 -0400 |
commit | 95c0214356a55b6bc051d2b779e54d6de7b0b22e (patch) | |
tree | 826f71b7c4099d6b37824bef4281a76a701229ab /lib/sqlalchemy | |
parent | 214ed6239eb187c32e37bb7e3e3ac76555e266aa (diff) | |
download | sqlalchemy-95c0214356a55b6bc051d2b779e54d6de7b0b22e.tar.gz |
working through syb capabilities
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/dialects/sybase/base.py | 3 | ||||
-rw-r--r-- | lib/sqlalchemy/test/requires.py | 30 |
2 files changed, 29 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/sybase/base.py b/lib/sqlalchemy/dialects/sybase/base.py index c0f0879fc..e182cc9e7 100644 --- a/lib/sqlalchemy/dialects/sybase/base.py +++ b/lib/sqlalchemy/dialects/sybase/base.py @@ -263,9 +263,6 @@ class SybaseSQLCompiler(compiler.SQLCompiler): 'milliseconds': 'millisecond' }) - def visit_mod(self, binary, **kw): - return "MOD(%s, %s)" % (self.process(binary.left), self.process(binary.right)) - def get_select_precolumns(self, select): s = select._distinct and "DISTINCT " or "" if select._limit: diff --git a/lib/sqlalchemy/test/requires.py b/lib/sqlalchemy/test/requires.py index 6cfab18ce..c4c745c54 100644 --- a/lib/sqlalchemy/test/requires.py +++ b/lib/sqlalchemy/test/requires.py @@ -10,7 +10,8 @@ from testing import \ _chain_decorators_on, \ exclude, \ emits_warning_on,\ - skip_if + skip_if,\ + fails_on import testing import sys @@ -48,6 +49,8 @@ def boolean_col_expressions(fn): no_support('firebird', 'not supported by database'), no_support('oracle', 'not supported by database'), no_support('mssql', 'not supported by database'), + no_support('sybase', 'not supported by database'), + no_support('maxdb', 'FIXME: verify not supported by database'), ) def identity(fn): @@ -153,6 +156,31 @@ def subqueries(fn): exclude('mysql', '<', (4, 1, 1), 'no subquery support'), ) +def intersect(fn): + """Target database must support INTERSECT or equivlaent.""" + return _chain_decorators_on( + fn, + fails_on('firebird', 'no support for INTERSECT'), + fails_on('mysql', 'no support for INTERSECT'), + fails_on('sybase', 'no support for INTERSECT'), + ) + +def except_(fn): + """Target database must support EXCEPT or equivlaent (i.e. MINUS).""" + return _chain_decorators_on( + fn, + fails_on('firebird', 'no support for EXCEPT'), + fails_on('mysql', 'no support for EXCEPT'), + fails_on('sybase', 'no support for EXCEPT'), + ) + +def offset(fn): + """Target database must support some method of adding OFFSET or equivalent to a result set.""" + return _chain_decorators_on( + fn, + fails_on('sybase', 'no support for OFFSET or equivalent'), + ) + def returning(fn): return _chain_decorators_on( fn, |