1: <?php
2:
3: namespace PHPixie\ORM\Wrappers\Type\Database;
4:
5: class Query extends \PHPixie\ORM\Conditions\Builder\Proxy
6: implements \PHPixie\ORM\Models\Type\Database\Query
7: {
8: 9: 10:
11: protected $query;
12:
13: public function __construct($query)
14: {
15: parent::__construct($query);
16: $this->query = $query;
17: }
18:
19: public function modelName()
20: {
21: return $this->query->modelName();
22: }
23:
24: public function limit($limit)
25: {
26: $this->query->limit($limit);
27: return $this;
28: }
29:
30: public function getLimit()
31: {
32: return $this->query->getLimit();
33: }
34:
35: public function clearLimit()
36: {
37: $this->query->clearLimit();
38: return $this;
39: }
40:
41:
42: public function offset($offset)
43: {
44: $this->query->offset($offset);
45: return $this;
46: }
47:
48: public function getOffset()
49: {
50: return $this->query->getOffset();
51: }
52:
53: public function clearOffset()
54: {
55: $this->query->clearOffset();
56: return $this;
57: }
58:
59: public function orderAscendingBy($field)
60: {
61: $this->query->orderAscendingBy($field);
62: return $this;
63: }
64:
65: public function orderDescendingBy($field)
66: {
67: $this->query->orderDescendingBy($field);
68: return $this;
69: }
70:
71: public function getOrderBy()
72: {
73: return $this->query->getOrderBy();
74: }
75:
76: public function clearOrderBy()
77: {
78: $this->query->clearOrderBy();
79: return $this;
80: }
81:
82: public function getConditions()
83: {
84: return $this->query->getConditions();
85: }
86:
87: public function planFind($preload = array())
88: {
89: return $this->query->planFind($preload);
90: }
91:
92: public function find($preload = array())
93: {
94: return $this->query->find($preload);
95: }
96:
97: public function findOne($preload = array())
98: {
99: return $this->query->findOne($preload);
100: }
101:
102: public function planDelete()
103: {
104: return $this->query->planDelete();
105: }
106:
107: public function delete()
108: {
109: $this->query->delete();
110: return $this;
111: }
112:
113: public function planUpdate($data)
114: {
115: return $this->query->planUpdate($data);
116: }
117:
118: public function update($data)
119: {
120: $this->query->update($data);
121: return $this;
122: }
123:
124: public function planUpdateValue($update)
125: {
126: return $this->query->planUpdateValue($update);
127: }
128:
129: public function getUpdateBuilder()
130: {
131: return $this->query->getUpdateBuilder();
132: }
133:
134: public function planCount()
135: {
136: return $this->query->planCount();
137: }
138:
139: public function count()
140: {
141: return $this->query->count();
142: }
143:
144: public function getRelationshipProperty($name)
145: {
146: return $this->query->getRelationshipProperty($name);
147: }
148:
149: public function __get($name)
150: {
151: return $this->query->__get($name);
152: }
153:
154: public function __call($method, $params)
155: {
156: return $this->query->__call($method, $params);
157: }
158: }
159: