|
1 | 1 | using System.Collections;
|
2 | 2 | using System.Collections.Generic;
|
| 3 | +using System.Linq; |
3 | 4 |
|
4 | 5 | namespace Appwrite
|
5 | 6 | {
|
@@ -40,6 +41,46 @@ namespace Appwrite
|
40 | 41 | return AddQuery(attribute, "search", value);
|
41 | 42 | }
|
42 | 43 |
|
| 44 | + public static string IsNull(string attribute) |
| 45 | + { |
| 46 | + return $"isNull(\"{attribute}\")"; |
| 47 | + } |
| 48 | + |
| 49 | + public static string IsNotNull(string attribute) |
| 50 | + { |
| 51 | + return $"isNotNull(\"{attribute}\")"; |
| 52 | + } |
| 53 | + |
| 54 | + public static string StartsWith(string attribute, string value) |
| 55 | + { |
| 56 | + return AddQuery(attribute, "startsWith", value); |
| 57 | + } |
| 58 | + |
| 59 | + public static string EndsWith(string attribute, string value) |
| 60 | + { |
| 61 | + return AddQuery(attribute, "endsWith", value); |
| 62 | + } |
| 63 | + |
| 64 | + public static string Between(string attribute, string start, string end) |
| 65 | + { |
| 66 | + return AddQuery(attribute, "between", new List<string> { start, end }); |
| 67 | + } |
| 68 | + |
| 69 | + public static string Between(string attribute, int start, int end) |
| 70 | + { |
| 71 | + return AddQuery(attribute, "between", new List<int> { start, end }); |
| 72 | + } |
| 73 | + |
| 74 | + public static string Between(string attribute, double start, double end) |
| 75 | + { |
| 76 | + return AddQuery(attribute, "between", new List<double> { start, end }); |
| 77 | + } |
| 78 | + |
| 79 | + public static string Select(List<string> attributes) |
| 80 | + { |
| 81 | + return $"select([{string.Join(",", attributes.Select(attribute => $"\"{attribute}\""))}])"; |
| 82 | + } |
| 83 | + |
43 | 84 | public static string CursorAfter(string documentId)
|
44 | 85 | {
|
45 | 86 | return $"cursorAfter(\"{documentId}\")";
|
|
0 commit comments