1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\Firestore;
|
---|
19 |
|
---|
20 | class StructuredQuery extends \Google\Collection
|
---|
21 | {
|
---|
22 | protected $collection_key = 'orderBy';
|
---|
23 | protected $endAtType = Cursor::class;
|
---|
24 | protected $endAtDataType = '';
|
---|
25 | protected $findNearestType = FindNearest::class;
|
---|
26 | protected $findNearestDataType = '';
|
---|
27 | protected $fromType = CollectionSelector::class;
|
---|
28 | protected $fromDataType = 'array';
|
---|
29 | /**
|
---|
30 | * @var int
|
---|
31 | */
|
---|
32 | public $limit;
|
---|
33 | /**
|
---|
34 | * @var int
|
---|
35 | */
|
---|
36 | public $offset;
|
---|
37 | protected $orderByType = Order::class;
|
---|
38 | protected $orderByDataType = 'array';
|
---|
39 | protected $selectType = Projection::class;
|
---|
40 | protected $selectDataType = '';
|
---|
41 | protected $startAtType = Cursor::class;
|
---|
42 | protected $startAtDataType = '';
|
---|
43 | protected $whereType = Filter::class;
|
---|
44 | protected $whereDataType = '';
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * @param Cursor
|
---|
48 | */
|
---|
49 | public function setEndAt(Cursor $endAt)
|
---|
50 | {
|
---|
51 | $this->endAt = $endAt;
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * @return Cursor
|
---|
55 | */
|
---|
56 | public function getEndAt()
|
---|
57 | {
|
---|
58 | return $this->endAt;
|
---|
59 | }
|
---|
60 | /**
|
---|
61 | * @param FindNearest
|
---|
62 | */
|
---|
63 | public function setFindNearest(FindNearest $findNearest)
|
---|
64 | {
|
---|
65 | $this->findNearest = $findNearest;
|
---|
66 | }
|
---|
67 | /**
|
---|
68 | * @return FindNearest
|
---|
69 | */
|
---|
70 | public function getFindNearest()
|
---|
71 | {
|
---|
72 | return $this->findNearest;
|
---|
73 | }
|
---|
74 | /**
|
---|
75 | * @param CollectionSelector[]
|
---|
76 | */
|
---|
77 | public function setFrom($from)
|
---|
78 | {
|
---|
79 | $this->from = $from;
|
---|
80 | }
|
---|
81 | /**
|
---|
82 | * @return CollectionSelector[]
|
---|
83 | */
|
---|
84 | public function getFrom()
|
---|
85 | {
|
---|
86 | return $this->from;
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * @param int
|
---|
90 | */
|
---|
91 | public function setLimit($limit)
|
---|
92 | {
|
---|
93 | $this->limit = $limit;
|
---|
94 | }
|
---|
95 | /**
|
---|
96 | * @return int
|
---|
97 | */
|
---|
98 | public function getLimit()
|
---|
99 | {
|
---|
100 | return $this->limit;
|
---|
101 | }
|
---|
102 | /**
|
---|
103 | * @param int
|
---|
104 | */
|
---|
105 | public function setOffset($offset)
|
---|
106 | {
|
---|
107 | $this->offset = $offset;
|
---|
108 | }
|
---|
109 | /**
|
---|
110 | * @return int
|
---|
111 | */
|
---|
112 | public function getOffset()
|
---|
113 | {
|
---|
114 | return $this->offset;
|
---|
115 | }
|
---|
116 | /**
|
---|
117 | * @param Order[]
|
---|
118 | */
|
---|
119 | public function setOrderBy($orderBy)
|
---|
120 | {
|
---|
121 | $this->orderBy = $orderBy;
|
---|
122 | }
|
---|
123 | /**
|
---|
124 | * @return Order[]
|
---|
125 | */
|
---|
126 | public function getOrderBy()
|
---|
127 | {
|
---|
128 | return $this->orderBy;
|
---|
129 | }
|
---|
130 | /**
|
---|
131 | * @param Projection
|
---|
132 | */
|
---|
133 | public function setSelect(Projection $select)
|
---|
134 | {
|
---|
135 | $this->select = $select;
|
---|
136 | }
|
---|
137 | /**
|
---|
138 | * @return Projection
|
---|
139 | */
|
---|
140 | public function getSelect()
|
---|
141 | {
|
---|
142 | return $this->select;
|
---|
143 | }
|
---|
144 | /**
|
---|
145 | * @param Cursor
|
---|
146 | */
|
---|
147 | public function setStartAt(Cursor $startAt)
|
---|
148 | {
|
---|
149 | $this->startAt = $startAt;
|
---|
150 | }
|
---|
151 | /**
|
---|
152 | * @return Cursor
|
---|
153 | */
|
---|
154 | public function getStartAt()
|
---|
155 | {
|
---|
156 | return $this->startAt;
|
---|
157 | }
|
---|
158 | /**
|
---|
159 | * @param Filter
|
---|
160 | */
|
---|
161 | public function setWhere(Filter $where)
|
---|
162 | {
|
---|
163 | $this->where = $where;
|
---|
164 | }
|
---|
165 | /**
|
---|
166 | * @return Filter
|
---|
167 | */
|
---|
168 | public function getWhere()
|
---|
169 | {
|
---|
170 | return $this->where;
|
---|
171 | }
|
---|
172 | }
|
---|
173 |
|
---|
174 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
175 | class_alias(StructuredQuery::class, 'Google_Service_Firestore_StructuredQuery');
|
---|