Skip to content

Commit 8550541

Browse files
committed
Update spatial queries
1 parent d799804 commit 8550541

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Sources/Appwrite/Query.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -448,95 +448,95 @@ public struct Query : Codable, CustomStringConvertible {
448448
return Query(
449449
method: "distanceEqual",
450450
attribute: attribute,
451-
values: [values, distance, meters]
451+
values: [[values, distance, meters]]
452452
).description
453453
}
454454

455455
public static func distanceNotEqual(_ attribute: String, values: [Any], distance: Double, meters: Bool = true) -> String {
456456
return Query(
457457
method: "distanceNotEqual",
458458
attribute: attribute,
459-
values: [values, distance, meters]
459+
values: [[values, distance, meters]]
460460
).description
461461
}
462462

463463
public static func distanceGreaterThan(_ attribute: String, values: [Any], distance: Double, meters: Bool = true) -> String {
464464
return Query(
465465
method: "distanceGreaterThan",
466466
attribute: attribute,
467-
values: [values, distance, meters]
467+
values: [[values, distance, meters]]
468468
).description
469469
}
470470

471471
public static func distanceLessThan(_ attribute: String, values: [Any], distance: Double, meters: Bool = true) -> String {
472472
return Query(
473473
method: "distanceLessThan",
474474
attribute: attribute,
475-
values: [values, distance, meters]
475+
values: [[values, distance, meters]]
476476
).description
477477
}
478478

479479
public static func intersects(_ attribute: String, values: [Any]) -> String {
480480
return Query(
481481
method: "intersects",
482482
attribute: attribute,
483-
values: values
483+
values: [values]
484484
).description
485485
}
486486

487487
public static func notIntersects(_ attribute: String, values: [Any]) -> String {
488488
return Query(
489489
method: "notIntersects",
490490
attribute: attribute,
491-
values: values
491+
values: [values]
492492
).description
493493
}
494494

495495
public static func crosses(_ attribute: String, values: [Any]) -> String {
496496
return Query(
497497
method: "crosses",
498498
attribute: attribute,
499-
values: values
499+
values: [values]
500500
).description
501501
}
502502

503503
public static func notCrosses(_ attribute: String, values: [Any]) -> String {
504504
return Query(
505505
method: "notCrosses",
506506
attribute: attribute,
507-
values: values
507+
values: [values]
508508
).description
509509
}
510510

511511
public static func overlaps(_ attribute: String, values: [Any]) -> String {
512512
return Query(
513513
method: "overlaps",
514514
attribute: attribute,
515-
values: values
515+
values: [values]
516516
).description
517517
}
518518

519519
public static func notOverlaps(_ attribute: String, values: [Any]) -> String {
520520
return Query(
521521
method: "notOverlaps",
522522
attribute: attribute,
523-
values: values
523+
values: [values]
524524
).description
525525
}
526526

527527
public static func touches(_ attribute: String, values: [Any]) -> String {
528528
return Query(
529529
method: "touches",
530530
attribute: attribute,
531-
values: values
531+
values: [values]
532532
).description
533533
}
534534

535535
public static func notTouches(_ attribute: String, values: [Any]) -> String {
536536
return Query(
537537
method: "notTouches",
538538
attribute: attribute,
539-
values: values
539+
values: [values]
540540
).description
541541
}
542542

0 commit comments

Comments
 (0)