Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

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

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

Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Apple SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

Expand All @@ -31,7 +31,7 @@ Add the package to your `Package.swift` dependencies:

```swift
dependencies: [
.package(url: "git@github.com:appwrite/sdk-for-apple.git", from: "10.2.0"),
.package(url: "git@github.com:appwrite/sdk-for-apple.git", from: "11.0.0"),
],
```

Expand Down
4 changes: 2 additions & 2 deletions Sources/Appwrite/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ open class Client {
"x-sdk-name": "Apple",
"x-sdk-platform": "client",
"x-sdk-language": "apple",
"x-sdk-version": "10.2.0",
"x-appwrite-response-format": "1.7.0"
"x-sdk-version": "11.0.0",
"x-appwrite-response-format": "1.8.0"
]

internal var config: [String: String] = [:]
Expand Down
84 changes: 84 additions & 0 deletions Sources/Appwrite/Query.swift
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,90 @@ public struct Query : Codable, CustomStringConvertible {
).description
}

public static func notContains(_ attribute: String, value: Any) -> String {
return Query(
method: "notContains",
attribute: attribute,
values: Query.parseValue(value)
).description
}

public static func notSearch(_ attribute: String, value: String) -> String {
return Query(
method: "notSearch",
attribute: attribute,
values: [value]
).description
}

public static func notBetween(_ attribute: String, start: Int, end: Int) -> String {
return Query(
method: "notBetween",
attribute: attribute,
values: [start, end]
).description
}

public static func notBetween(_ attribute: String, start: Double, end: Double) -> String {
return Query(
method: "notBetween",
attribute: attribute,
values: [start, end]
).description
}

public static func notBetween(_ attribute: String, start: String, end: String) -> String {
return Query(
method: "notBetween",
attribute: attribute,
values: [start, end]
).description
}

public static func notStartsWith(_ attribute: String, value: String) -> String {
return Query(
method: "notStartsWith",
attribute: attribute,
values: [value]
).description
}

public static func notEndsWith(_ attribute: String, value: String) -> String {
return Query(
method: "notEndsWith",
attribute: attribute,
values: [value]
).description
}

public static func createdBefore(_ value: String) -> String {
return Query(
method: "createdBefore",
values: [value]
).description
}

public static func createdAfter(_ value: String) -> String {
return Query(
method: "createdAfter",
values: [value]
).description
}

public static func updatedBefore(_ value: String) -> String {
return Query(
method: "updatedBefore",
values: [value]
).description
}

public static func updatedAfter(_ value: String) -> String {
return Query(
method: "updatedAfter",
values: [value]
).description
}

public static func or(_ queries: [String]) -> String {
let decoder = JSONDecoder()
let decodedQueries = queries.compactMap { queryStr -> Query? in
Expand Down
Loading