You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.2 KiB

14 years ago
9 years ago
9 years ago
14 years ago
14 years ago
12 years ago
14 years ago
14 years ago
14 years ago
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Bart Visscher <bartv@thisnet.nl>
  6. * @author Dan Bartram <daneybartram@gmail.com>
  7. * @author Frank Karlitschek <frank@karlitschek.de>
  8. * @author Joas Schilling <coding@schilljs.com>
  9. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  10. * @author Lukas Reschke <lukas@statuscode.ch>
  11. * @author Morris Jobke <hey@morrisjobke.de>
  12. * @author Robin Appelman <robin@icewind.nl>
  13. * @author Roeland Jago Douma <roeland@famdouma.nl>
  14. * @author Thomas Müller <thomas.mueller@tmit.eu>
  15. * @author Thomas Tanghus <thomas@tanghus.net>
  16. *
  17. * @license AGPL-3.0
  18. *
  19. * This code is free software: you can redistribute it and/or modify
  20. * it under the terms of the GNU Affero General Public License, version 3,
  21. * as published by the Free Software Foundation.
  22. *
  23. * This program is distributed in the hope that it will be useful,
  24. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. * GNU Affero General Public License for more details.
  27. *
  28. * You should have received a copy of the GNU Affero General Public License, version 3,
  29. * along with this program. If not, see <http://www.gnu.org/licenses/>
  30. *
  31. */
  32. /**
  33. * Public interface of ownCloud for apps to use.
  34. * DB Class
  35. *
  36. */
  37. // use OCP namespace for all classes that are considered public.
  38. // This means that they should be used by apps instead of the internal ownCloud classes
  39. namespace OCP;
  40. /**
  41. * This class provides access to the internal database system. Use this class exlusively if you want to access databases
  42. * @deprecated 8.1.0 use methods of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
  43. * @since 4.5.0
  44. */
  45. class DB {
  46. /**
  47. * Prepare a SQL query
  48. * @param string $query Query string
  49. * @param int $limit Limit of the SQL statement
  50. * @param int $offset Offset of the SQL statement
  51. * @return \OC_DB_StatementWrapper prepared SQL query
  52. *
  53. * SQL query via Doctrine prepare(), needs to be execute()'d!
  54. * @deprecated 8.1.0 use prepare() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
  55. * @since 4.5.0
  56. */
  57. static public function prepare( $query, $limit=null, $offset=null ) {
  58. return \OC_DB::prepare($query, $limit, $offset);
  59. }
  60. }