Remove now-unused SQL timestamp conversion functions added in r77231. They were made...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 31 Dec 2010 16:29:44 +0000 (16:29 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 31 Dec 2010 16:29:44 +0000 (16:29 +0000)
includes/db/Database.php
includes/db/DatabaseMssql.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/DatabaseSqlite.php

index e8b7c60..95d572f 100644 (file)
@@ -2044,16 +2044,6 @@ abstract class DatabaseBase implements DatabaseType {
                return "REPLACE({$orig}, {$old}, {$new})";
        }
 
-       /**
-        * Convert a field to an unix timestamp
-        *
-        * @param $field String: field name
-        * @return String: SQL statement
-        */
-       public function unixTimestamp( $field ) {
-               return "EXTRACT(epoch FROM $field)";
-       }
-
        /**
         * Determines if the last failure was due to a deadlock
         * STUB
index 4f09069..aa6212b 100644 (file)
@@ -787,10 +787,6 @@ class DatabaseMssql extends DatabaseBase {
                return false;
        }
 
-       public function unixTimestamp( $field ) {
-               return "DATEDIFF(s,CONVERT(datetime,'1/1/1970'),$field)";
-       }
-
        /**
         * Begin a transaction, committing any previously open transaction
         */
index 7ecc3de..e6bd2b2 100644 (file)
@@ -478,9 +478,6 @@ class DatabaseMysql extends DatabaseBase {
                $this->query( "SET sql_big_selects=$encValue", __METHOD__ );
        }
 
-       public function unixTimestamp( $field ) {
-               return "UNIX_TIMESTAMP($field)";
-       }
 
        /**
         * Determines if the last failure was due to a deadlock
index 8893e2e..00be0f1 100644 (file)
@@ -839,10 +839,6 @@ class DatabaseOracle extends DatabaseBase {
                return 'SELECT * ' . ( $all ? '':'/* UNION_UNIQUE */ ' ) . 'FROM (' . implode( $glue, $sqls ) . ')' ;
        }
 
-       public function unixTimestamp( $field ) {
-               return "((trunc($field) - to_date('19700101','YYYYMMDD')) * 86400)";
-       }
-
        function wasDeadlock() {
                return $this->lastErrno() == 'OCI-00060';
        }
index 92b8124..1058fd8 100644 (file)
@@ -431,10 +431,6 @@ class DatabaseSqlite extends DatabaseBase {
                return implode( $glue, $sqls );
        }
 
-       public function unixTimestamp( $field ) {
-               return $field;
-       }
-
        function wasDeadlock() {
                return $this->lastErrno() == 5; // SQLITE_BUSY
        }