File tree Expand file tree Collapse file tree 5 files changed +31
-19
lines changed
android/library/src/main/java/io/appwrite
kotlin/src/main/kotlin/io/appwrite Expand file tree Collapse file tree 5 files changed +31
-19
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ class Query {
20
20
21
21
fun orderDesc(attribute: String) = "orderDesc(\"${attribute}\")"
22
22
23
- fun cursorBefore(attribute : String) = "cursorBefore(\"${attribute }\")"
23
+ fun cursorBefore(documentId : String) = "cursorBefore(\"${documentId }\")"
24
24
25
- fun cursorAfter(attribute : String) = "cursorAfter(\"${attribute }\")"
25
+ fun cursorAfter(documentId : String) = "cursorAfter(\"${documentId }\")"
26
26
27
27
fun limit(limit: Int) = "limit(${limit})"
28
28
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ class Query {
20
20
21
21
fun orderDesc(attribute: String) = "orderDesc(\"${attribute}\")"
22
22
23
- fun cursorBefore(attribute : String) = "cursorBefore(\"${attribute }\")"
23
+ fun cursorBefore(documentId : String) = "cursorBefore(\"${documentId }\")"
24
24
25
- fun cursorAfter(attribute : String) = "cursorAfter(\"${attribute }\")"
25
+ fun cursorAfter(documentId : String) = "cursorAfter(\"${documentId }\")"
26
26
27
27
fun limit(limit: Int) = "limit(${limit})"
28
28
Original file line number Diff line number Diff line change @@ -157,7 +157,19 @@ declare module "{{ language.params.npmPackage|caseDash }}" {
157
157
158
158
static search(attribute: string, value: string): string;
159
159
160
- private static addQuery(attribute: string, oper: string, value: QueryTypes): string;
160
+ static orderDesc(attribute: string): string;
161
+
162
+ static orderAsc(attribute: string): string;
163
+
164
+ static cursorAfter(documentId: string): string;
165
+
166
+ static cursorBefore(documentId: string): string;
167
+
168
+ static limit(value: number): string;
169
+
170
+ static offset = (value: number): string;
171
+
172
+ private static addQuery(attribute: string, method: string, value: QueryTypes): string;
161
173
162
174
private static parseValues(value: QueryTypes): string;
163
175
}
Original file line number Diff line number Diff line change @@ -91,41 +91,41 @@ class Query
91
91
/**
92
92
* Cursor After
93
93
*
94
- * @param String $attribute
94
+ * @param String $documentId
95
95
* @return string
96
96
*/
97
- public static function cursorAfter (String $attribute ): string {
98
- return ' cursorAfter("' . $attribute . ' ")' ;
97
+ public static function cursorAfter (String $documentId ): string {
98
+ return ' cursorAfter("' . $documentId . ' ")' ;
99
99
}
100
100
101
101
/**
102
102
* Cursor Before
103
103
*
104
- * @param String $attribute
104
+ * @param String $documentId
105
105
* @return string
106
106
*/
107
- public static function cursorBefore (String $attribute ): string {
108
- return ' cursorBefore("' . $attribute . ' ")' ;
107
+ public static function cursorBefore (String $documentId ): string {
108
+ return ' cursorBefore("' . $documentId . ' ")' ;
109
109
}
110
110
111
111
/**
112
112
* Order Asc
113
113
*
114
- * @param String $id
114
+ * @param String $attribute
115
115
* @return string
116
116
*/
117
- public static function orderAsc (String $id ): string {
118
- return ' orderAsc("' . $id . ' ")' ;
117
+ public static function orderAsc (String $attribute ): string {
118
+ return ' orderAsc("' . $attribute . ' ")' ;
119
119
}
120
120
121
121
/**
122
122
* Order Desc
123
123
*
124
- * @param String $id
124
+ * @param String $attribute
125
125
* @return string
126
126
*/
127
- public static function orderDesc (String $id ): string {
128
- return ' orderDesc("' . $id . ' ")' ;
127
+ public static function orderDesc (String $attribute ): string {
128
+ return ' orderDesc("' . $attribute . ' ")' ;
129
129
}
130
130
131
131
/**
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ abstract class Base extends TestCase
61
61
const QUERY_HELPER_RESPONSES = [
62
62
'equal("title", ["Spiderman","Dr. Strange"]) ' ,
63
63
'notEqual("title", ["Spiderman"]) ' ,
64
- 'lesser ("releasedYear", [1990]) ' ,
65
- 'greater ("releasedYear", [1990,1999]) ' ,
64
+ 'lessThan ("releasedYear", [1990]) ' ,
65
+ 'greaterThan ("releasedYear", [1990,1999]) ' ,
66
66
'search("name", ["john"]) ' ,
67
67
'orderAsc("title") ' ,
68
68
'orderDesc("title") ' ,
You can’t perform that action at this time.
0 commit comments