Skip to content

Commit 3ef704f

Browse files
authored
Merge pull request #38 from appwrite/dev
Add 1.8.x support
2 parents 8dfd3d4 + 096c306 commit 3ef704f

File tree

160 files changed

+6717
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+6717
-154
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-swift.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-swift.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
99

10-
**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-swift/releases).**
10+
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-swift/releases).**
1111

1212
> This is the Swift SDK for integrating with Appwrite from your Swift server-side code. If you're looking for the Apple SDK you should check [appwrite/sdk-for-apple](https://github.com/appwrite/sdk-for-apple)
1313
@@ -33,7 +33,7 @@ Add the package to your `Package.swift` dependencies:
3333

3434
```swift
3535
dependencies: [
36-
.package(url: "git@github.com:appwrite/sdk-for-swift.git", from: "10.2.0"),
36+
.package(url: "git@github.com:appwrite/sdk-for-swift.git", from: "11.0.0"),
3737
],
3838
```
3939

Sources/Appwrite/Client.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ open class Client {
2121
"x-sdk-name": "Swift",
2222
"x-sdk-platform": "server",
2323
"x-sdk-language": "swift",
24-
"x-sdk-version": "10.2.0",
25-
"x-appwrite-response-format": "1.7.0"
24+
"x-sdk-version": "11.0.0",
25+
"x-appwrite-response-format": "1.8.0"
2626
]
2727

2828
internal var config: [String: String] = [:]

Sources/Appwrite/Query.swift

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,90 @@ public struct Query : Codable, CustomStringConvertible {
284284
).description
285285
}
286286

287+
public static func notContains(_ attribute: String, value: Any) -> String {
288+
return Query(
289+
method: "notContains",
290+
attribute: attribute,
291+
values: Query.parseValue(value)
292+
).description
293+
}
294+
295+
public static func notSearch(_ attribute: String, value: String) -> String {
296+
return Query(
297+
method: "notSearch",
298+
attribute: attribute,
299+
values: [value]
300+
).description
301+
}
302+
303+
public static func notBetween(_ attribute: String, start: Int, end: Int) -> String {
304+
return Query(
305+
method: "notBetween",
306+
attribute: attribute,
307+
values: [start, end]
308+
).description
309+
}
310+
311+
public static func notBetween(_ attribute: String, start: Double, end: Double) -> String {
312+
return Query(
313+
method: "notBetween",
314+
attribute: attribute,
315+
values: [start, end]
316+
).description
317+
}
318+
319+
public static func notBetween(_ attribute: String, start: String, end: String) -> String {
320+
return Query(
321+
method: "notBetween",
322+
attribute: attribute,
323+
values: [start, end]
324+
).description
325+
}
326+
327+
public static func notStartsWith(_ attribute: String, value: String) -> String {
328+
return Query(
329+
method: "notStartsWith",
330+
attribute: attribute,
331+
values: [value]
332+
).description
333+
}
334+
335+
public static func notEndsWith(_ attribute: String, value: String) -> String {
336+
return Query(
337+
method: "notEndsWith",
338+
attribute: attribute,
339+
values: [value]
340+
).description
341+
}
342+
343+
public static func createdBefore(_ value: String) -> String {
344+
return Query(
345+
method: "createdBefore",
346+
values: [value]
347+
).description
348+
}
349+
350+
public static func createdAfter(_ value: String) -> String {
351+
return Query(
352+
method: "createdAfter",
353+
values: [value]
354+
).description
355+
}
356+
357+
public static func updatedBefore(_ value: String) -> String {
358+
return Query(
359+
method: "updatedBefore",
360+
values: [value]
361+
).description
362+
}
363+
364+
public static func updatedAfter(_ value: String) -> String {
365+
return Query(
366+
method: "updatedAfter",
367+
values: [value]
368+
).description
369+
}
370+
287371
public static func or(_ queries: [String]) -> String {
288372
let decoder = JSONDecoder()
289373
let decodedQueries = queries.compactMap { queryStr -> Query? in

0 commit comments

Comments
 (0)