Commits

Mike Bayer  committed 047be8d

fixes mostly to get the important unit tests to run for Oracle, boxesw without wsgi_utils

  • Participants
  • Parent commits 25e9d45

Comments (0)

Files changed (4)

File lib/sqlalchemy/databases/oracle.py

             self.strings[column] = "%s.%s(+)" % (column.table.name, column.name)
         else:
             self.strings[column] = "%s.%s" % (column.table.name, column.name)
-        
+       
+    def visit_function(self, func):
+        if len(func.clauses):
+            super(OracleCompiler, self).visit_function(func)
+        else:
+            self.strings[func] = func.name
+ 
     def visit_insert(self, insert):
         """inserts are required to have the primary keys be explicitly present.
          mapper will by default not put them in the insert statement to comply

File lib/sqlalchemy/sql.py

                     cp = self._proxy_column(co)
                     self._orig_cols[co.original] = cp
     def _exportable_columns(self):
-        raise NotImplementedError(repr(self))
+	return []
     def _proxy_column(self, column):
         return column._make_proxy(self)
     

File test/alltests.py

         
         # extensions
         'proxy_engine',
-        'wsgi_test',
+        #'wsgi_test',
         
         )
 

File test/query.py

             return x['x']
 
         use_function_defaults = db.engine.__module__.endswith('postgres') or db.engine.__module__.endswith('oracle')
-        
+        is_oracle = db.engine.__module__.endswith('oracle')
+ 
         # select "count(1)" from the DB which returns different results
         # on different DBs
-        f = select([func.count(1) + 5], engine=db).scalar()
-        if use_function_defaults:
+        if is_oracle:
+            f = select([func.count(1) + 5], engine=db, from_obj=['DUAL']).scalar()
+            ts = select([func.sysdate()], engine=db, from_obj=['DUAL']).scalar()
+            def1 = func.sysdate()
+            def2 = text("sysdate")
+            deftype = Date
+        elif use_function_defaults:
+            f = select([func.count(1) + 5], engine=db).scalar()
             def1 = func.current_date()
             def2 = text("current_date")
             deftype = Date