Changeset 2208

Show
Ignore:
Timestamp:
03/01/2008 02:50:19 PM (10 months ago)
Author:
zombor
Message:

Moving default exceptions back to the base database driver.

Location:
trunk/system/libraries/drivers
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Database.php

    r2193 r2208  
    6464         * @param  string  character set to use 
    6565         */ 
    66         abstract public function set_charset($charset); 
     66        public function set_charset($charset) 
     67        { 
     68                throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
     69        } 
    6770 
    6871        /** 
     
    191194         * @return  string 
    192195         */ 
    193         abstract public function regex($field, $match, $type, $num_regexs); 
     196        public function regex($field, $match, $type, $num_regexs) 
     197        { 
     198                throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
     199        } 
    194200 
    195201        /** 
     
    202208         * @return  string 
    203209         */ 
    204         abstract public function notregex($field, $match, $type, $num_regexs); 
     210        public function notregex($field, $match, $type, $num_regexs) 
     211        { 
     212                throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
     213        } 
    205214 
    206215        /** 
     
    230239         * @return  string 
    231240         */ 
    232         abstract public function merge($table, $keys, $values); 
     241        public function merge($table, $keys, $values) 
     242        { 
     243                throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
     244        } 
    233245 
    234246        /** 
     
    247259         * @return  Database_Stmt 
    248260         */ 
    249         abstract public function stmt_prepare($sql = ''); 
     261        public function stmt_prepare($sql = '') 
     262        { 
     263                throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
     264        } 
    250265 
    251266        /** 
  • trunk/system/libraries/drivers/Database/Mssql.php

    r2206 r2208  
    101101        } 
    102102 
    103         public function set_charset($charset) 
    104         { 
    105                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    106         } 
    107  
    108103        public function escape_table($table) 
    109104        { 
     
    164159                } 
    165160                return $column; 
    166         } 
    167          
    168         /* As far as I know, T-SQL doesn't have the REGEXP or NOT REGEXP keywords 
    169          *  
    170          */ 
    171         public function regex($field, $match = '', $type = 'AND ', $num_regexs) 
    172         { 
    173                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    174         } 
    175  
    176         public function notregex($field, $match = '', $type = 'AND ', $num_regexs) 
    177         { 
    178                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    179         } 
    180  
    181         /* MERGE (or UPSERT) not supported in SQL SERVER 2000 
    182          * somone with a more recent version should add this 
    183          * feature in. 
    184          */ 
    185         public function merge($table, $keys, $values) 
    186         { 
    187                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    188161        } 
    189162         
     
    200173        { 
    201174                return 'TOP '.$limit; 
    202         } 
    203  
    204         public function stmt_prepare($sql = '') 
    205         { 
    206                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    207175        } 
    208176 
  • trunk/system/libraries/drivers/Database/Mysql.php

    r2196 r2208  
    192192        } 
    193193 
    194         public function stmt_prepare($sql = '') 
    195         { 
    196                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    197         } 
    198  
    199194        public function compile_select($database) 
    200195        { 
  • trunk/system/libraries/drivers/Database/Pdosqlite.php

    r2196 r2208  
    132132        } 
    133133 
    134         public function regex($field, $match = '', $type = 'AND ', $num_regexs) 
    135         { 
    136                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    137         } 
    138  
    139         public function notregex($field, $match = '', $type = 'AND ', $num_regexs) 
    140         { 
    141                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    142         } 
    143  
    144         public function merge($table, $keys, $values) 
    145         { 
    146                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    147         } 
    148  
    149134        public function limit($limit, $offset = 0) 
    150135        { 
    151136                return 'LIMIT '.$offset.', '.$limit; 
    152         } 
    153  
    154         public function stmt_prepare($sql = '') 
    155         { 
    156                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    157137        } 
    158138 
  • trunk/system/libraries/drivers/Database/Pgsql.php

    r2204 r2208  
    150150 
    151151                return $prefix.' '.$this->escape_column($field).' NOT REGEXP \''.$this->escape_str($match) . '\''; 
    152         } 
    153  
    154         public function merge($table, $keys, $values) 
    155         { 
    156                 throw new Kohana_Database_Exception('database.not_implemented', __FUNCTION__); 
    157152        } 
    158153