Skip to content

Commit a8df672

Browse files
committed
Fix syntax
1 parent c1f633e commit a8df672

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

templates/android/library/src/main/java/io/appwrite/Query.kt.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Query {
2222

2323
fun between(attribute: String, start: Int, end: Int) = Query.addQuery(attribute, "between", listOf(start, end))
2424

25-
fun between(attribute: String, start: Float, end: Float) = Query.addQuery(attribute, "between", listOf(start, end))
25+
fun between(attribute: String, start: Double, end: Double) = Query.addQuery(attribute, "between", listOf(start, end))
2626

2727
fun between(attribute: String, start: String, end: String) = Query.addQuery(attribute, "between", listOf(start, end))
2828

templates/dart/lib/query.dart.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Query {
3737
static endsWith(String attribute, String value) =>
3838
_addQuery(attribute, 'endsWith', value);
3939

40-
static select(List<String> attributes) => 'select([${attributes.map((attr) => "$attr").join(",")}])';
40+
static select(List<String> attributes) => 'select([${attributes.map((attr) => "\"$attr\"").join(",")}])';
4141

4242
static String orderAsc(String attribute) => 'orderAsc("$attribute")';
4343

templates/deno/src/query.ts.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class Query {
3030
static isNotNull = (attribute: string): string =>
3131
`isNotNull("${attribute}")`;
3232

33-
static between = (attribute: string, start: string|number, end: string|number): string =>
33+
static between = (attribute: string, start: QueryTypesSingle, end: QueryTypesSingle): string =>
3434
Query.addQuery(attribute, "between", [start, end]);
3535

3636
static startsWith = (attribute: string, value: string): string =>

templates/kotlin/src/main/kotlin/io/appwrite/Query.kt.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Query {
2222

2323
fun between(attribute: String, start: Int, end: Int) = Query.addQuery(attribute, "between", listOf(start, end))
2424

25-
fun between(attribute: String, start: Float, end: Float) = Query.addQuery(attribute, "between", listOf(start, end))
25+
fun between(attribute: String, start: Double, end: Double) = Query.addQuery(attribute, "between", listOf(start, end))
2626

2727
fun between(attribute: String, start: String, end: String) = Query.addQuery(attribute, "between", listOf(start, end))
2828

templates/php/src/Query.php.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class Query
118118
* @param string|int|float $end
119119
* @return string
120120
*/
121-
public static function between(string $attribute, mixed $start, mixed $end): string
121+
public static function between(string $attribute, $start, $end): string
122122
{
123123
return self::addQuery($attribute, 'between', [$start, $end]);
124124
}

tests/Base.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ abstract class Base extends TestCase
7272
'between("age", [50,100])',
7373
'between("age", [50.5,100.5])',
7474
'between("name", ["Anna","Brad"])',
75-
'startsWith("name", "Ann")',
76-
'endsWith("name", "nne")',
77-
'select("name", "age")',
75+
'startsWith("name", ["Ann"])',
76+
'endsWith("name", ["nne"])',
77+
'select(["name","age"])',
7878
'orderAsc("title")',
7979
'orderDesc("title")',
8080
'cursorAfter("my_movie_id")',

0 commit comments

Comments
 (0)