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

Source for file Driver_Reverse_skeleton.php

Documentation is available at Driver_Reverse_skeleton.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PHP versions 4 and 5                                                 |
  4. // +----------------------------------------------------------------------+
  5. // | Copyright (c) 1998-2004 Manuel Lemos, Tomas V.V.Cox,                 |
  6. // | Stig. S. Bakken, Lukas Smith                                         |
  7. // | All rights reserved.                                                 |
  8. // +----------------------------------------------------------------------+
  9. // | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB  |
  10. // | API as well as database abstraction for PHP applications.            |
  11. // | This LICENSE is in the BSD license style.                            |
  12. // |                                                                      |
  13. // | Redistribution and use in source and binary forms, with or without   |
  14. // | modification, are permitted provided that the following conditions   |
  15. // | are met:                                                             |
  16. // |                                                                      |
  17. // | Redistributions of source code must retain the above copyright       |
  18. // | notice, this list of conditions and the following disclaimer.        |
  19. // |                                                                      |
  20. // | Redistributions in binary form must reproduce the above copyright    |
  21. // | notice, this list of conditions and the following disclaimer in the  |
  22. // | documentation and/or other materials provided with the distribution. |
  23. // |                                                                      |
  24. // | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,    |
  25. // | Lukas Smith nor the names of his contributors may be used to endorse |
  26. // | or promote products derived from this software without specific prior|
  27. // | written permission.                                                  |
  28. // |                                                                      |
  29. // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  |
  30. // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT    |
  31. // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS    |
  32. // | FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE      |
  33. // | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,          |
  34. // | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
  35. // | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
  36. // |  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  |
  37. // | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT          |
  38. // | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
  39. // | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE          |
  40. // | POSSIBILITY OF SUCH DAMAGE.                                          |
  41. // +----------------------------------------------------------------------+
  42. // | Author: YOUR NAME <YOUR EMAIL>                                       |
  43. // +----------------------------------------------------------------------+
  44. //
  45. // $Id: Driver_Reverse_skeleton.php,v 1.4 2005/01/02 21:40:20 lsmith Exp $
  46. //
  47.  
  48. // This is just a skeleton MDB2 driver.
  49.  
  50. // In each of the listed methods I have added comments that tell you where
  51. // to look for a "reference" implementation.
  52. // Many of the methods below are taken from Metabase. Most of the methods
  53. // marked as "new in MDB2" are actually taken from the latest beta files of
  54. // Metabase. However these beta files only include a version for MySQL.
  55. // Some of these methods have been expanded or changed slightly in MDB2.
  56. // Looking in the relevant MDB2 Wrapper should give you some pointers, some
  57. // other difference you will only discover by looking at one of the existing
  58. // MDB2 driver or the common implementation in common.php.
  59. // One thing that will definately have to be modified in all "reference"
  60. // implementations of Metabase methods is the error handling.
  61. // Anyways don't worry if you are having problems: Lukas Smith is here to help!
  62.  
  63. require_once 'MDB2/Driver/Reverse/Common.php';
  64.  
  65. /**
  66.  * MDB2 Xxx driver for the management modules
  67.  *
  68.  * @package MDB2
  69.  * @category Database
  70.  * @author  YOUR NAME <YOUR EMAIL>
  71.  */
  72. class MDB2_Reverse_xxx extends MDB2_Reverse_Common
  73. {
  74.     // }}}
  75.     // {{{ getTableFieldDefinition()
  76.  
  77.     /**
  78.      * get the stucture of a field into an array
  79.      *
  80.      * @param string    $table         name of table that should be used in method
  81.      * @param string    $field_name     name of field that should be used in method
  82.      * @return mixed data array on success, a MDB2 error on failure
  83.      * @access public
  84.      */
  85.     function getTableFieldDefinition($table$field_name)
  86.     {
  87.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  88.         // new in MDB2
  89.     }
  90.  
  91.     // }}}
  92.     // {{{ getTableIndexDefinition()
  93.  
  94.     /**
  95.      * get the stucture of an index into an array
  96.      *
  97.      * @param string    $table      name of table that should be used in method
  98.      * @param string    $index_name name of index that should be used in method
  99.      * @return mixed data array on success, a MDB2 error on failure
  100.      * @access public
  101.      */
  102.     function getTableIndexDefinition($table$index_name)
  103.     {
  104.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  105.         // new in MDB2
  106.     }
  107.  
  108.     // }}}
  109.     // {{{ getSequenceDefinition()
  110.  
  111.     /**
  112.      * get the stucture of a sequence into an array
  113.      *
  114.      * @param string    $sequence   name of sequence that should be used in method
  115.      * @return mixed data array on success, a MDB2 error on failure
  116.      * @access public
  117.      */
  118.     function getSequenceDefinition($sequence)
  119.     {
  120.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  121.         // new in MDB2
  122.     }
  123. }
  124. ?>

Documentation generated on Mon, 11 Mar 2019 14:20:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.