MDB2
[ class tree: MDB2 ] [ index: MDB2 ] [ all elements ]

Source for file querysim.php

Documentation is available at querysim.php

  1. <?php
  2. // vim: set et ts=4 sw=4 fdm=marker:
  3. // +----------------------------------------------------------------------+
  4. // | PHP versions 4 and 5                                                 |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox,                 |
  7. // | Stig. S. Bakken, Lukas Smith                                         |
  8. // | All rights reserved.                                                 |
  9. // +----------------------------------------------------------------------+
  10. // | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB  |
  11. // | API as well as database abstraction for PHP applications.            |
  12. // | This LICENSE is in the BSD license style.                            |
  13. // |                                                                      |
  14. // | Redistribution and use in source and binary forms, with or without   |
  15. // | modification, are permitted provided that the following conditions   |
  16. // | are met:                                                             |
  17. // |                                                                      |
  18. // | Redistributions of source code must retain the above copyright       |
  19. // | notice, this list of conditions and the following disclaimer.        |
  20. // |                                                                      |
  21. // | Redistributions in binary form must reproduce the above copyright    |
  22. // | notice, this list of conditions and the following disclaimer in the  |
  23. // | documentation and/or other materials provided with the distribution. |
  24. // |                                                                      |
  25. // | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,    |
  26. // | Lukas Smith nor the names of his contributors may be used to endorse |
  27. // | or promote products derived from this software without specific prior|
  28. // | written permission.                                                  |
  29. // |                                                                      |
  30. // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  |
  31. // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT    |
  32. // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS    |
  33. // | FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE      |
  34. // | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,          |
  35. // | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
  36. // | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
  37. // |  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  |
  38. // | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT          |
  39. // | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
  40. // | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE          |
  41. // | POSSIBILITY OF SUCH DAMAGE.                                          |
  42. // +----------------------------------------------------------------------+
  43. // | Author: Lukas Smith <smith@pooteeweet.org>                           |
  44. // +----------------------------------------------------------------------+
  45. //
  46. // $Id: querysim.php 327310 2012-08-27 15:16:18Z danielc $
  47. //
  48.  
  49. require_once 'MDB2/Driver/Datatype/Common.php';
  50.  
  51. /**
  52.  * MDB2 QuerySim driver
  53.  *
  54.  * @package MDB2
  55.  * @category Database
  56.  * @author  Lukas Smith <smith@pooteeweet.org>
  57.  */
  58. class MDB2_Driver_Datatype_querysim extends MDB2_Driver_Datatype_Common
  59. {
  60.     // {{{ getTypeDeclaration()
  61.  
  62.     /**
  63.      * Obtain DBMS specific SQL code portion needed to declare an text type
  64.      * field to be used in statements like CREATE TABLE.
  65.      *
  66.      * @param array $field  associative array with the name of the properties
  67.      *       of the field being declared as array indexes. Currently, the types
  68.      *       of supported field properties are as follows:
  69.      *
  70.      *       length
  71.      *           Integer value that determines the maximum length of the text
  72.      *           field. If this argument is missing the field should be
  73.      *           declared to have the longest length allowed by the DBMS.
  74.      *
  75.      *       default
  76.      *           Text value to be used as default for this field.
  77.      *
  78.      *       notnull
  79.      *           Boolean flag that indicates whether this field is constrained
  80.      *           to not be set to null.
  81.      * @return string  DBMS specific SQL code portion that should be used to
  82.      *       declare the specified field.
  83.      * @access public
  84.      */
  85.     function getTypeDeclaration($field)
  86.     {
  87.         $db =$this->getDBInstance();
  88.         if (MDB2::isError($db)) {
  89.             return $db;
  90.         }
  91.  
  92.         return $db->raiseError(MDB2_ERROR_UNSUPPORTEDnullnull,
  93.             'method not implemented'__FUNCTION__);
  94.     }
  95.  
  96.     // }}}
  97. }
  98.  
  99. ?>

Documentation generated on Mon, 11 Mar 2019 15:51:24 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.