1: <?php
2: /**
3: * DataTables PHP libraries.
4: *
5: * PHP libraries for DataTables and DataTables Editor, utilising PHP 5.3+.
6: *
7: * @author SpryMedia
8: * @copyright 2012 SpryMedia ( http://sprymedia.co.uk )
9: * @license http://editor.datatables.net/license DataTables Editor
10: * @link http://editor.datatables.net
11: */
12:
13: namespace DataTables\Database;
14: if (!defined('DATATABLES')) exit();
15:
16:
17: //
18: // This is a stub class that a driver must extend and complete
19: //
20:
21: /**
22: * Result object given by a {@link Query} performed on a database.
23: *
24: * The typical pattern for using this class is to receive an instance of it as a
25: * result of using the {@link Database} and {@link Query} class methods that
26: * return a result. This class should not be initialised independently.
27: *
28: * Note that this is a stub class that a driver will extend and complete as
29: * required for individual database types. Individual drivers could add
30: * additional methods, but this is discouraged to ensure that the API is the
31: * same for all database types.
32: */
33: class Result {
34: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
35: * Public methods
36: */
37:
38: /**
39: * Count the number of rows in the result set.
40: * @return int
41: */
42: public function count ()
43: {
44: return 0;
45: }
46:
47:
48: /**
49: * Get the next row in a result set
50: * @return array
51: */
52: public function fetch ()
53: {
54: return array();
55: }
56:
57:
58: /**
59: * Get all rows in the result set
60: * @return array
61: */
62: public function fetchAll ()
63: {
64: return array();
65: }
66:
67:
68: /**
69: * After an INSERT query, get the ID that was inserted.
70: * @return int
71: */
72: public function insertId ()
73: {
74: return 0;
75: }
76: };
77:
78:
79: