Skip to content

Commit c19d53d

Browse files
committed
Add 1.8.x support
1 parent 5404196 commit c19d53d

File tree

158 files changed

+6608
-118
lines changed

Some content is hidden

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

158 files changed

+6608
-118
lines changed

README.md

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

33
![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.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
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

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

1111
> This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android)
1212
@@ -39,7 +39,7 @@ repositories {
3939
Next, add the dependency to your project's `build.gradle(.kts)` file:
4040

4141
```groovy
42-
implementation("io.appwrite:sdk-for-kotlin:9.1.2")
42+
implementation("io.appwrite:sdk-for-kotlin:10.0.0")
4343
```
4444

4545
### Maven
@@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
5050
<dependency>
5151
<groupId>io.appwrite</groupId>
5252
<artifactId>sdk-for-kotlin</artifactId>
53-
<version>9.1.2</version>
53+
<version>10.0.0</version>
5454
</dependency>
5555
</dependencies>
5656
```

docs/examples/java/databases/create.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ databases.create(
1313
"<DATABASE_ID>", // databaseId
1414
"<NAME>", // name
1515
false, // enabled (optional)
16+
.TABLESDB, // type (optional)
1617
new CoroutineCallback<>((result, error) -> {
1718
if (error != null) {
1819
error.printStackTrace();
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.TablesDb;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
TablesDb tablesDb = new TablesDb(client);
11+
12+
tablesDb.createBooleanColumn(
13+
"<DATABASE_ID>", // databaseId
14+
"<TABLE_ID>", // tableId
15+
"", // key
16+
false, // required
17+
false, // default (optional)
18+
false, // array (optional)
19+
new CoroutineCallback<>((result, error) -> {
20+
if (error != null) {
21+
error.printStackTrace();
22+
return;
23+
}
24+
25+
System.out.println(result);
26+
})
27+
);
28+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.TablesDb;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
TablesDb tablesDb = new TablesDb(client);
11+
12+
tablesDb.createDatetimeColumn(
13+
"<DATABASE_ID>", // databaseId
14+
"<TABLE_ID>", // tableId
15+
"", // key
16+
false, // required
17+
"", // default (optional)
18+
false, // array (optional)
19+
new CoroutineCallback<>((result, error) -> {
20+
if (error != null) {
21+
error.printStackTrace();
22+
return;
23+
}
24+
25+
System.out.println(result);
26+
})
27+
);
28+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.TablesDb;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
TablesDb tablesDb = new TablesDb(client);
11+
12+
tablesDb.createEmailColumn(
13+
"<DATABASE_ID>", // databaseId
14+
"<TABLE_ID>", // tableId
15+
"", // key
16+
false, // required
17+
"[email protected]", // default (optional)
18+
false, // array (optional)
19+
new CoroutineCallback<>((result, error) -> {
20+
if (error != null) {
21+
error.printStackTrace();
22+
return;
23+
}
24+
25+
System.out.println(result);
26+
})
27+
);
28+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.TablesDb;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
TablesDb tablesDb = new TablesDb(client);
11+
12+
tablesDb.createEnumColumn(
13+
"<DATABASE_ID>", // databaseId
14+
"<TABLE_ID>", // tableId
15+
"", // key
16+
listOf(), // elements
17+
false, // required
18+
"<DEFAULT>", // default (optional)
19+
false, // array (optional)
20+
new CoroutineCallback<>((result, error) -> {
21+
if (error != null) {
22+
error.printStackTrace();
23+
return;
24+
}
25+
26+
System.out.println(result);
27+
})
28+
);
29+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.TablesDb;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
TablesDb tablesDb = new TablesDb(client);
11+
12+
tablesDb.createFloatColumn(
13+
"<DATABASE_ID>", // databaseId
14+
"<TABLE_ID>", // tableId
15+
"", // key
16+
false, // required
17+
0, // min (optional)
18+
0, // max (optional)
19+
0, // default (optional)
20+
false, // array (optional)
21+
new CoroutineCallback<>((result, error) -> {
22+
if (error != null) {
23+
error.printStackTrace();
24+
return;
25+
}
26+
27+
System.out.println(result);
28+
})
29+
);
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.TablesDb;
4+
import io.appwrite.enums.IndexType;
5+
6+
Client client = new Client()
7+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
9+
.setKey("<YOUR_API_KEY>"); // Your secret API key
10+
11+
TablesDb tablesDb = new TablesDb(client);
12+
13+
tablesDb.createIndex(
14+
"<DATABASE_ID>", // databaseId
15+
"<TABLE_ID>", // tableId
16+
"", // key
17+
IndexType.KEY, // type
18+
listOf(), // columns
19+
listOf(), // orders (optional)
20+
listOf(), // lengths (optional)
21+
new CoroutineCallback<>((result, error) -> {
22+
if (error != null) {
23+
error.printStackTrace();
24+
return;
25+
}
26+
27+
System.out.println(result);
28+
})
29+
);
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.TablesDb;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
TablesDb tablesDb = new TablesDb(client);
11+
12+
tablesDb.createIntegerColumn(
13+
"<DATABASE_ID>", // databaseId
14+
"<TABLE_ID>", // tableId
15+
"", // key
16+
false, // required
17+
0, // min (optional)
18+
0, // max (optional)
19+
0, // default (optional)
20+
false, // array (optional)
21+
new CoroutineCallback<>((result, error) -> {
22+
if (error != null) {
23+
error.printStackTrace();
24+
return;
25+
}
26+
27+
System.out.println(result);
28+
})
29+
);
30+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.TablesDb;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
TablesDb tablesDb = new TablesDb(client);
11+
12+
tablesDb.createIpColumn(
13+
"<DATABASE_ID>", // databaseId
14+
"<TABLE_ID>", // tableId
15+
"", // key
16+
false, // required
17+
"", // default (optional)
18+
false, // array (optional)
19+
new CoroutineCallback<>((result, error) -> {
20+
if (error != null) {
21+
error.printStackTrace();
22+
return;
23+
}
24+
25+
System.out.println(result);
26+
})
27+
);
28+

0 commit comments

Comments
 (0)