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 Version 4                                                        |
  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.2 2004/01/08 13:43:28 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.     // {{{ constructor
  76.  
  77.     /**
  78.      * Constructor
  79.      */
  80.     function MDB2_Reverse_xxx($db_index)
  81.     {
  82.         $this->MDB2_Reverse_Common($db_index);
  83.     }
  84.  
  85.     // }}}
  86.     // {{{ getTableFieldDefinition()
  87.  
  88.     /**
  89.      * get the stucture of a field into an array
  90.      *
  91.      * @param string    $table         name of table that should be used in method
  92.      * @param string    $field_name     name of field that should be used in method
  93.      * @return mixed data array on success, a MDB2 error on failure
  94.      * @access public
  95.      */
  96.     function getTableFieldDefinition($table$field_name)
  97.     {
  98.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  99.         // new in MDB2
  100.     }
  101.  
  102.     // }}}
  103.     // {{{ getTableIndexDefinition()
  104.  
  105.     /**
  106.      * get the stucture of an index into an array
  107.      *
  108.      * @param string    $table      name of table that should be used in method
  109.      * @param string    $index_name name of index that should be used in method
  110.      * @return mixed data array on success, a MDB2 error on failure
  111.      * @access public
  112.      */
  113.     function getTableIndexDefinition($table$index_name)
  114.     {
  115.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  116.         // new in MDB2
  117.     }
  118.  
  119.     // }}}
  120.     // {{{ getSequenceDefinition()
  121.  
  122.     /**
  123.      * get the stucture of a sequence into an array
  124.      *
  125.      * @param string    $sequence   name of sequence that should be used in method
  126.      * @return mixed data array on success, a MDB2 error on failure
  127.      * @access public
  128.      */
  129.     function getSequenceDefinition($sequence)
  130.     {
  131.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  132.         // new in MDB2
  133.     }
  134. }
  135. ?>

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