Source for file Connection.php

Documentation is available at Connection.php

  1. <?php
  2. /**
  3. * The Connection represents the channel of communication with the database.
  4. * It is the means of submitting a query or update for execution. A
  5. * ResultTable is returned by the executeQuery() methods. The executeUpdate()
  6. * methods are used to execute commands that do not return resultsets such as
  7. * inserts, deletes, and other data management commands.
  8. *
  9. * <p>
  10. * OSID Version: 2.0
  11. * </p>
  12. *
  13. * <p>
  14. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  15. * O.K.I&#46; OSID Definition License}.
  16. * </p>
  17. *
  18. * @package org.osid.sql
  19. */
  20. class Connection
  21. {
  22. /**
  23. * execute the SQL statement
  24. *
  25. * @param string $sql
  26. *
  27. * @return object ResultTable
  28. *
  29. * @throws object SqlException An exception with one of the following
  30. * messages defined in org.osid.sql.SqlException may be thrown:
  31. * {@link org.osid.sql.SqlException#OPERATION_FAILED}
  32. * OPERATION_FAILED}, {@link }
  33. * org.osid.sql.SqlException#PERMISSION_DENIED PERMISSION_DENIED},
  34. * {@link org.osid.sql.SqlException#CONFIGURATION_ERROR}
  35. * CONFIGURATION_ERROR}, {@link }
  36. * org.osid.sql.SqlException#UNIMPLEMENTED UNIMPLEMENTED}
  37. *
  38. * @access public
  39. */
  40. function executeQuery ( $sql ) {
  41. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  42. }
  43.  
  44. /**
  45. * execute the SQL statement replacing '?'s sequentially with the args.
  46. *
  47. * @param string $sql
  48. * @param string $args
  49. *
  50. * @return object ResultTable
  51. *
  52. * @throws object SqlException An exception with one of the following
  53. * messages defined in org.osid.sql.SqlException may be thrown:
  54. * {@link org.osid.sql.SqlException#OPERATION_FAILED}
  55. * OPERATION_FAILED}, {@link }
  56. * org.osid.sql.SqlException#PERMISSION_DENIED PERMISSION_DENIED},
  57. * {@link org.osid.sql.SqlException#CONFIGURATION_ERROR}
  58. * CONFIGURATION_ERROR}, {@link }
  59. * org.osid.sql.SqlException#UNIMPLEMENTED UNIMPLEMENTED}
  60. *
  61. * @access public
  62. */
  63. function executeQueryWithArgs ( $sql, $args ) {
  64. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  65. }
  66.  
  67. /**
  68. * update the database using the SQL statement.
  69. *
  70. * @param string $sql
  71. *
  72. * @return int
  73. *
  74. * @throws object SqlException An exception with one of the following
  75. * messages defined in org.osid.sql.SqlException may be thrown:
  76. * {@link org.osid.sql.SqlException#OPERATION_FAILED}
  77. * OPERATION_FAILED}, {@link }
  78. * org.osid.sql.SqlException#PERMISSION_DENIED PERMISSION_DENIED},
  79. * {@link org.osid.sql.SqlException#CONFIGURATION_ERROR}
  80. * CONFIGURATION_ERROR}, {@link }
  81. * org.osid.sql.SqlException#UNIMPLEMENTED UNIMPLEMENTED}
  82. *
  83. * @access public
  84. */
  85. function executeUpdate ( $sql ) {
  86. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  87. }
  88.  
  89. /**
  90. * update the database using the SQL statement replacing '?'s sequentially
  91. * with the args.
  92. *
  93. * @param string $sql
  94. * @param string $args
  95. *
  96. * @return int
  97. *
  98. * @throws object SqlException An exception with one of the following
  99. * messages defined in org.osid.sql.SqlException may be thrown:
  100. * {@link org.osid.sql.SqlException#OPERATION_FAILED}
  101. * OPERATION_FAILED}, {@link }
  102. * org.osid.sql.SqlException#PERMISSION_DENIED PERMISSION_DENIED},
  103. * {@link org.osid.sql.SqlException#CONFIGURATION_ERROR}
  104. * CONFIGURATION_ERROR}, {@link }
  105. * org.osid.sql.SqlException#UNIMPLEMENTED UNIMPLEMENTED}
  106. *
  107. * @access public
  108. */
  109. function executeUpdateWithArgs ( $sql, $args ) {
  110. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  111. }
  112.  
  113. /**
  114. * return the SQL data types supported by this implementation
  115. *
  116. * @return object TypeIterator
  117. *
  118. * @throws object SqlException An exception with one of the following
  119. * messages defined in org.osid.sql.SqlException may be thrown:
  120. * {@link org.osid.sql.SqlException#OPERATION_FAILED}
  121. * OPERATION_FAILED}, {@link }
  122. * org.osid.sql.SqlException#PERMISSION_DENIED PERMISSION_DENIED},
  123. * {@link org.osid.sql.SqlException#CONFIGURATION_ERROR}
  124. * CONFIGURATION_ERROR}, {@link }
  125. * org.osid.sql.SqlException#UNIMPLEMENTED UNIMPLEMENTED}
  126. *
  127. * @access public
  128. */
  129. function getSqlTypes () {
  130. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  131. }
  132. }
  133.  
  134. ?>

Documentation generated on Wed, 19 Sep 2007 10:22:08 -0400 by phpDocumentor 1.3.0RC3