Commit 3114ebd8 authored by zYne's avatar zYne

Removed futile datadict exception classes

parent 3e4f3625
...@@ -173,7 +173,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict ...@@ -173,7 +173,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
$length = null; $length = null;
break; break;
default: default:
throw new Doctrine_DataDict_Firebird_Exception('unknown database attribute type: '.$dbType); throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$dbType);
} }
return array($type, $length, $unsigned, $fixed); return array($type, $length, $unsigned, $fixed);
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine::autoload('Doctrine_DataDict_Exception');
/**
* Doctrine_DataDict_Sqlite_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_DataDict_Firebird_Exception extends Doctrine_DataDict_Exception
{ }
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine::autoload('Doctrine_DataDict_Informix_Exception');
/**
* Doctrine_DataDict_Sqlite_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_DataDict_Informix_Exception extends Doctrine_DataDict_Exception
{ }
...@@ -170,11 +170,9 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict ...@@ -170,11 +170,9 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
$length = null; $length = null;
break; break;
default: default:
throw new Doctrine_DataDict_Mssql_Exception('unknown database attribute type: '.$db_type); throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$db_type);
} }
return array($type, $length, $unsigned, $fixed); return array($type, $length, $unsigned, $fixed);
} }
} }
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine::autoload('Doctrine_DataDict_Exception');
/**
* Doctrine_DataDict_Mssql_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_DataDict_Mssql_Exception extends Doctrine_DataDict_Exception
{ }
...@@ -356,7 +356,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict ...@@ -356,7 +356,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
$length = null; $length = null;
break; break;
default: default:
throw new Doctrine_DataDict_Mysql_Exception('unknown database attribute type: '.$dbType); throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$dbType);
} }
$length = ((int) $length == 0) ? null : (int) $length; $length = ((int) $length == 0) ? null : (int) $length;
...@@ -422,7 +422,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict ...@@ -422,7 +422,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
if ($field['default'] === '') { if ($field['default'] === '') {
$field['default'] = empty($field['notnull']) ? null : 0; $field['default'] = empty($field['notnull']) ? null : 0;
} }
$default = ' DEFAULT '.$this->conn->getDbh()->quote($field['default']); $default = ' DEFAULT '.$this->conn->quote($field['default']);
} }
/** /**
elseif (empty($field['notnull'])) { elseif (empty($field['notnull'])) {
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine::autoload('Doctrine_DataDict_Exception');
/**
* Doctrine_DataDict_Mysql_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_DataDict_Mysql_Exception extends Doctrine_DataDict_Exception
{ }
...@@ -174,7 +174,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict ...@@ -174,7 +174,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
case 'rowid': case 'rowid':
case 'urowid': case 'urowid':
default: default:
throw new Doctrine_DataDict_Oracle_Exception('unknown database attribute type: '.$db_type); throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$db_type);
} }
return array($type, $length, $unsigned, $fixed); return array($type, $length, $unsigned, $fixed);
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine::autoload('Doctrine_DataDict_Exception');
/**
* Doctrine_DataDict_Oracle_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_DataDict_Oracle_Exception extends Doctrine_DataDict_Exception
{ }
...@@ -412,7 +412,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict ...@@ -412,7 +412,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
$length = !empty($field['length']) ? $field['length'] : 18; $length = !empty($field['length']) ? $field['length'] : 18;
return 'NUMERIC(' . $length . ',' . $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES) . ')'; return 'NUMERIC(' . $length . ',' . $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES) . ')';
default: default:
throw new Doctrine_DataDict_Pgsql_Exception('Unknown field type '. $field['type']); throw new Doctrine_DataDict_Exception('Unknown field type '. $field['type']);
} }
} }
/** /**
...@@ -537,7 +537,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict ...@@ -537,7 +537,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
$length = null; $length = null;
break; break;
default: default:
throw new Doctrine_DataDict_Pgsql_Exception('unknown database attribute type: '.$db_type); throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$db_type);
} }
return array($type, $length, $unsigned, $fixed); return array($type, $length, $unsigned, $fixed);
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine::autoload('Doctrine_DataDict_Exception');
/**
* Doctrine_DataDict_Pgsql_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_DataDict_Pgsql_Exception extends Doctrine_DataDict_Exception
{ }
...@@ -112,7 +112,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict ...@@ -112,7 +112,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
$length = !empty($field['length']) ? $field['length'] : 18; $length = !empty($field['length']) ? $field['length'] : 18;
return 'DECIMAL('.$length.','.$this->conn->options['decimal_places'].')'; return 'DECIMAL('.$length.','.$this->conn->options['decimal_places'].')';
} }
throw new Doctrine_DataDict_Sqlite_Exception('Unknown datatype ' . $field['type']); throw new Doctrine_DataDict_Exception('Unknown datatype ' . $field['type']);
} }
/** /**
* Maps a native array description of a field to Doctrine datatype and length * Maps a native array description of a field to Doctrine datatype and length
...@@ -227,7 +227,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict ...@@ -227,7 +227,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
$length = null; $length = null;
break; break;
default: default:
throw new Doctrine_DataDict_Sqlite_Exception('unknown database attribute type: '.$dbType); throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$dbType);
} }
return array($type, $length, $unsigned, $fixed); return array($type, $length, $unsigned, $fixed);
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine::autoload('Doctrine_DataDict_Exception');
/**
* Doctrine_DataDict_Sqlite_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_DataDict_Sqlite_Exception extends Doctrine_DataDict_Exception
{ }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment