mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
commit
1dbcfcc154
673 changed files with 4352 additions and 304 deletions
|
|
@ -11,7 +11,7 @@ return [
|
|||
[
|
||||
'key' => 'web',
|
||||
'name' => 'Web',
|
||||
'version' => '21.1.0',
|
||||
'version' => '21.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-web',
|
||||
'package' => 'https://www.npmjs.com/package/appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -24,7 +24,7 @@ return [
|
|||
'gitUrl' => 'git@github.com:appwrite/sdk-for-web.git',
|
||||
'gitRepoName' => 'sdk-for-web',
|
||||
'gitUserName' => 'appwrite',
|
||||
'gitBranch' => 'feat-txn',
|
||||
'gitBranch' => 'dev',
|
||||
'changelog' => \realpath(__DIR__ . '/../../docs/sdks/web/CHANGELOG.md'),
|
||||
'demos' => [
|
||||
[
|
||||
|
|
@ -60,7 +60,7 @@ return [
|
|||
[
|
||||
'key' => 'flutter',
|
||||
'name' => 'Flutter',
|
||||
'version' => '20.1.0',
|
||||
'version' => '20.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-flutter',
|
||||
'package' => 'https://pub.dev/packages/appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -79,7 +79,7 @@ return [
|
|||
[
|
||||
'key' => 'apple',
|
||||
'name' => 'Apple',
|
||||
'version' => '13.1.0',
|
||||
'version' => '13.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-apple',
|
||||
'package' => 'https://github.com/appwrite/sdk-for-apple',
|
||||
'enabled' => true,
|
||||
|
|
@ -116,7 +116,7 @@ return [
|
|||
[
|
||||
'key' => 'android',
|
||||
'name' => 'Android',
|
||||
'version' => '11.1.0',
|
||||
'version' => '11.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-android',
|
||||
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
|
||||
'enabled' => true,
|
||||
|
|
@ -139,7 +139,7 @@ return [
|
|||
[
|
||||
'key' => 'react-native',
|
||||
'name' => 'React Native',
|
||||
'version' => '0.16.0',
|
||||
'version' => '0.17.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-react-native',
|
||||
'package' => 'https://npmjs.com/package/react-native-appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -207,7 +207,7 @@ return [
|
|||
[
|
||||
'key' => 'web',
|
||||
'name' => 'Console',
|
||||
'version' => '0.1.0',
|
||||
'version' => '0.1.1',
|
||||
'url' => '',
|
||||
'package' => '',
|
||||
'enabled' => true,
|
||||
|
|
@ -226,7 +226,7 @@ return [
|
|||
[
|
||||
'key' => 'cli',
|
||||
'name' => 'Command Line',
|
||||
'version' => '10.1.0',
|
||||
'version' => '10.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-cli',
|
||||
'package' => 'https://www.npmjs.com/package/appwrite-cli',
|
||||
'enabled' => true,
|
||||
|
|
@ -262,7 +262,7 @@ return [
|
|||
[
|
||||
'key' => 'nodejs',
|
||||
'name' => 'Node.js',
|
||||
'version' => '20.1.0',
|
||||
'version' => '20.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-node',
|
||||
'package' => 'https://www.npmjs.com/package/node-appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -275,13 +275,13 @@ return [
|
|||
'gitUrl' => 'git@github.com:appwrite/sdk-for-node.git',
|
||||
'gitRepoName' => 'sdk-for-node',
|
||||
'gitUserName' => 'appwrite',
|
||||
'gitBranch' => 'feat-txn',
|
||||
'gitBranch' => 'dev',
|
||||
'changelog' => \realpath(__DIR__ . '/../../docs/sdks/nodejs/CHANGELOG.md'),
|
||||
],
|
||||
[
|
||||
'key' => 'php',
|
||||
'name' => 'PHP',
|
||||
'version' => '17.3.0',
|
||||
'version' => '17.4.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-php',
|
||||
'package' => 'https://packagist.org/packages/appwrite/appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -300,7 +300,7 @@ return [
|
|||
[
|
||||
'key' => 'python',
|
||||
'name' => 'Python',
|
||||
'version' => '13.3.0',
|
||||
'version' => '13.4.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-python',
|
||||
'package' => 'https://pypi.org/project/appwrite/',
|
||||
'enabled' => true,
|
||||
|
|
@ -319,7 +319,7 @@ return [
|
|||
[
|
||||
'key' => 'ruby',
|
||||
'name' => 'Ruby',
|
||||
'version' => '19.1.0',
|
||||
'version' => '19.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-ruby',
|
||||
'package' => 'https://rubygems.org/gems/appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -338,7 +338,7 @@ return [
|
|||
[
|
||||
'key' => 'go',
|
||||
'name' => 'Go',
|
||||
'version' => 'v0.12.0',
|
||||
'version' => 'v0.13.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-go',
|
||||
'package' => 'https://github.com/appwrite/sdk-for-go',
|
||||
'enabled' => true,
|
||||
|
|
@ -357,7 +357,7 @@ return [
|
|||
[
|
||||
'key' => 'dotnet',
|
||||
'name' => '.NET',
|
||||
'version' => '0.20.0',
|
||||
'version' => '0.21.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
|
||||
'package' => 'https://www.nuget.org/packages/Appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -376,7 +376,7 @@ return [
|
|||
[
|
||||
'key' => 'dart',
|
||||
'name' => 'Dart',
|
||||
'version' => '19.1.0',
|
||||
'version' => '19.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-dart',
|
||||
'package' => 'https://pub.dev/packages/dart_appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -395,7 +395,7 @@ return [
|
|||
[
|
||||
'key' => 'kotlin',
|
||||
'name' => 'Kotlin',
|
||||
'version' => '12.1.0',
|
||||
'version' => '12.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
|
||||
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
|
||||
'enabled' => true,
|
||||
|
|
@ -418,7 +418,7 @@ return [
|
|||
[
|
||||
'key' => 'swift',
|
||||
'name' => 'Swift',
|
||||
'version' => '13.1.0',
|
||||
'version' => '13.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-swift',
|
||||
'package' => 'https://github.com/appwrite/sdk-for-swift',
|
||||
'enabled' => true,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ databases.createDocument(
|
|||
"isAdmin" to false
|
||||
), // data
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.createOperations(
|
||||
"<TRANSACTION_ID>", // transactionId
|
||||
listOf(
|
||||
{
|
||||
"action": "create",
|
||||
"databaseId": "<DATABASE_ID>",
|
||||
"collectionId": "<COLLECTION_ID>",
|
||||
"documentId": "<DOCUMENT_ID>",
|
||||
"data": {
|
||||
"name": "Walter O'Brien"
|
||||
}
|
||||
}
|
||||
), // operations (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.createTransaction(
|
||||
60, // ttl (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ databases.decrementDocumentAttribute(
|
|||
"", // attribute
|
||||
0, // value (optional)
|
||||
0, // min (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ databases.deleteDocument(
|
|||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
"<DOCUMENT_ID>", // documentId
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.deleteTransaction(
|
||||
"<TRANSACTION_ID>", // transactionId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -13,6 +13,7 @@ databases.getDocument(
|
|||
"<COLLECTION_ID>", // collectionId
|
||||
"<DOCUMENT_ID>", // documentId
|
||||
listOf(), // queries (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.getTransaction(
|
||||
"<TRANSACTION_ID>", // transactionId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ databases.incrementDocumentAttribute(
|
|||
"", // attribute
|
||||
0, // value (optional)
|
||||
0, // max (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ databases.listDocuments(
|
|||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
listOf(), // queries (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.listTransactions(
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -14,6 +14,7 @@ databases.updateDocument(
|
|||
"<DOCUMENT_ID>", // documentId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.updateTransaction(
|
||||
"<TRANSACTION_ID>", // transactionId
|
||||
false, // commit (optional)
|
||||
false, // rollback (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -14,6 +14,7 @@ databases.upsertDocument(
|
|||
"<DOCUMENT_ID>", // documentId
|
||||
mapOf( "a" to "b" ), // data
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.TablesDB;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
TablesDB tablesDB = new TablesDB(client);
|
||||
|
||||
tablesDB.createOperations(
|
||||
"<TRANSACTION_ID>", // transactionId
|
||||
listOf(
|
||||
{
|
||||
"action": "create",
|
||||
"databaseId": "<DATABASE_ID>",
|
||||
"tableId": "<TABLE_ID>",
|
||||
"rowId": "<ROW_ID>",
|
||||
"data": {
|
||||
"name": "Walter O'Brien"
|
||||
}
|
||||
}
|
||||
), // operations (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -20,6 +20,7 @@ tablesDB.createRow(
|
|||
"isAdmin" to false
|
||||
), // data
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.TablesDB;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
TablesDB tablesDB = new TablesDB(client);
|
||||
|
||||
tablesDB.createTransaction(
|
||||
60, // ttl (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ tablesDB.decrementRowColumn(
|
|||
"", // column
|
||||
0, // value (optional)
|
||||
0, // min (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ tablesDB.deleteRow(
|
|||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.TablesDB;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
TablesDB tablesDB = new TablesDB(client);
|
||||
|
||||
tablesDB.deleteTransaction(
|
||||
"<TRANSACTION_ID>", // transactionId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -13,6 +13,7 @@ tablesDB.getRow(
|
|||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
listOf(), // queries (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.TablesDB;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
TablesDB tablesDB = new TablesDB(client);
|
||||
|
||||
tablesDB.getTransaction(
|
||||
"<TRANSACTION_ID>", // transactionId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ tablesDB.incrementRowColumn(
|
|||
"", // column
|
||||
0, // value (optional)
|
||||
0, // max (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ tablesDB.listRows(
|
|||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
listOf(), // queries (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.TablesDB;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
TablesDB tablesDB = new TablesDB(client);
|
||||
|
||||
tablesDB.listTransactions(
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -14,6 +14,7 @@ tablesDB.updateRow(
|
|||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.TablesDB;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
TablesDB tablesDB = new TablesDB(client);
|
||||
|
||||
tablesDB.updateTransaction(
|
||||
"<TRANSACTION_ID>", // transactionId
|
||||
false, // commit (optional)
|
||||
false, // rollback (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -14,6 +14,7 @@ tablesDB.upsertRow(
|
|||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -20,4 +20,5 @@ val result = databases.createDocument(
|
|||
"isAdmin" to false
|
||||
),
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
val result = databases.createOperations(
|
||||
transactionId = "<TRANSACTION_ID>",
|
||||
operations = listOf(
|
||||
{
|
||||
"action": "create",
|
||||
"databaseId": "<DATABASE_ID>",
|
||||
"collectionId": "<COLLECTION_ID>",
|
||||
"documentId": "<DOCUMENT_ID>",
|
||||
"data": {
|
||||
"name": "Walter O'Brien"
|
||||
}
|
||||
}
|
||||
), // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
val result = databases.createTransaction(
|
||||
ttl = 60, // (optional)
|
||||
)
|
||||
|
|
@ -15,4 +15,5 @@ val result = databases.decrementDocumentAttribute(
|
|||
attribute = "",
|
||||
value = 0, // (optional)
|
||||
min = 0, // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -12,4 +12,5 @@ val result = databases.deleteDocument(
|
|||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
val result = databases.deleteTransaction(
|
||||
transactionId = "<TRANSACTION_ID>",
|
||||
)
|
||||
|
|
@ -13,4 +13,5 @@ val result = databases.getDocument(
|
|||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
queries = listOf(), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
val result = databases.getTransaction(
|
||||
transactionId = "<TRANSACTION_ID>",
|
||||
)
|
||||
|
|
@ -15,4 +15,5 @@ val result = databases.incrementDocumentAttribute(
|
|||
attribute = "",
|
||||
value = 0, // (optional)
|
||||
max = 0, // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -12,4 +12,5 @@ val result = databases.listDocuments(
|
|||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
queries = listOf(), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
val result = databases.listTransactions(
|
||||
queries = listOf(), // (optional)
|
||||
)
|
||||
|
|
@ -14,4 +14,5 @@ val result = databases.updateDocument(
|
|||
documentId = "<DOCUMENT_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
val result = databases.updateTransaction(
|
||||
transactionId = "<TRANSACTION_ID>",
|
||||
commit = false, // (optional)
|
||||
rollback = false, // (optional)
|
||||
)
|
||||
|
|
@ -14,4 +14,5 @@ val result = databases.upsertDocument(
|
|||
documentId = "<DOCUMENT_ID>",
|
||||
data = mapOf( "a" to "b" ),
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.TablesDB
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val tablesDB = TablesDB(client)
|
||||
|
||||
val result = tablesDB.createOperations(
|
||||
transactionId = "<TRANSACTION_ID>",
|
||||
operations = listOf(
|
||||
{
|
||||
"action": "create",
|
||||
"databaseId": "<DATABASE_ID>",
|
||||
"tableId": "<TABLE_ID>",
|
||||
"rowId": "<ROW_ID>",
|
||||
"data": {
|
||||
"name": "Walter O'Brien"
|
||||
}
|
||||
}
|
||||
), // (optional)
|
||||
)
|
||||
|
|
@ -20,4 +20,5 @@ val result = tablesDB.createRow(
|
|||
"isAdmin" to false
|
||||
),
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.TablesDB
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val tablesDB = TablesDB(client)
|
||||
|
||||
val result = tablesDB.createTransaction(
|
||||
ttl = 60, // (optional)
|
||||
)
|
||||
|
|
@ -15,4 +15,5 @@ val result = tablesDB.decrementRowColumn(
|
|||
column = "",
|
||||
value = 0, // (optional)
|
||||
min = 0, // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -12,4 +12,5 @@ val result = tablesDB.deleteRow(
|
|||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.TablesDB
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val tablesDB = TablesDB(client)
|
||||
|
||||
val result = tablesDB.deleteTransaction(
|
||||
transactionId = "<TRANSACTION_ID>",
|
||||
)
|
||||
|
|
@ -13,4 +13,5 @@ val result = tablesDB.getRow(
|
|||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
queries = listOf(), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.TablesDB
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val tablesDB = TablesDB(client)
|
||||
|
||||
val result = tablesDB.getTransaction(
|
||||
transactionId = "<TRANSACTION_ID>",
|
||||
)
|
||||
|
|
@ -15,4 +15,5 @@ val result = tablesDB.incrementRowColumn(
|
|||
column = "",
|
||||
value = 0, // (optional)
|
||||
max = 0, // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -12,4 +12,5 @@ val result = tablesDB.listRows(
|
|||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
queries = listOf(), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.TablesDB
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val tablesDB = TablesDB(client)
|
||||
|
||||
val result = tablesDB.listTransactions(
|
||||
queries = listOf(), // (optional)
|
||||
)
|
||||
|
|
@ -14,4 +14,5 @@ val result = tablesDB.updateRow(
|
|||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.TablesDB
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val tablesDB = TablesDB(client)
|
||||
|
||||
val result = tablesDB.updateTransaction(
|
||||
transactionId = "<TRANSACTION_ID>",
|
||||
commit = false, // (optional)
|
||||
rollback = false, // (optional)
|
||||
)
|
||||
|
|
@ -14,4 +14,5 @@ val result = tablesDB.upsertRow(
|
|||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -17,6 +17,7 @@ let document = try await databases.createDocument(
|
|||
"age": 30,
|
||||
"isAdmin": false
|
||||
],
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Databases(client)
|
||||
|
||||
let transaction = try await databases.createOperations(
|
||||
transactionId: "<TRANSACTION_ID>",
|
||||
operations: [
|
||||
{
|
||||
"action": "create",
|
||||
"databaseId": "<DATABASE_ID>",
|
||||
"collectionId": "<COLLECTION_ID>",
|
||||
"documentId": "<DOCUMENT_ID>",
|
||||
"data": {
|
||||
"name": "Walter O'Brien"
|
||||
}
|
||||
}
|
||||
] // optional
|
||||
)
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Databases(client)
|
||||
|
||||
let transaction = try await databases.createTransaction(
|
||||
ttl: 60 // optional
|
||||
)
|
||||
|
||||
|
|
@ -12,6 +12,7 @@ let document = try await databases.decrementDocumentAttribute(
|
|||
documentId: "<DOCUMENT_ID>",
|
||||
attribute: "",
|
||||
value: 0, // optional
|
||||
min: 0 // optional
|
||||
min: 0, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ let databases = Databases(client)
|
|||
let result = try await databases.deleteDocument(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>"
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Databases(client)
|
||||
|
||||
let result = try await databases.deleteTransaction(
|
||||
transactionId: "<TRANSACTION_ID>"
|
||||
)
|
||||
|
||||
|
|
@ -10,6 +10,7 @@ let document = try await databases.getDocument(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
queries: [] // optional
|
||||
queries: [], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Databases(client)
|
||||
|
||||
let transaction = try await databases.getTransaction(
|
||||
transactionId: "<TRANSACTION_ID>"
|
||||
)
|
||||
|
||||
|
|
@ -12,6 +12,7 @@ let document = try await databases.incrementDocumentAttribute(
|
|||
documentId: "<DOCUMENT_ID>",
|
||||
attribute: "",
|
||||
value: 0, // optional
|
||||
max: 0 // optional
|
||||
max: 0, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ let databases = Databases(client)
|
|||
let documentList = try await databases.listDocuments(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
queries: [] // optional
|
||||
queries: [], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Databases(client)
|
||||
|
||||
let transactionList = try await databases.listTransactions(
|
||||
queries: [] // optional
|
||||
)
|
||||
|
||||
|
|
@ -11,6 +11,7 @@ let document = try await databases.updateDocument(
|
|||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [:], // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Databases(client)
|
||||
|
||||
let transaction = try await databases.updateTransaction(
|
||||
transactionId: "<TRANSACTION_ID>",
|
||||
commit: false, // optional
|
||||
rollback: false // optional
|
||||
)
|
||||
|
||||
|
|
@ -11,6 +11,7 @@ let document = try await databases.upsertDocument(
|
|||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [:],
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let tablesDB = TablesDB(client)
|
||||
|
||||
let transaction = try await tablesDB.createOperations(
|
||||
transactionId: "<TRANSACTION_ID>",
|
||||
operations: [
|
||||
{
|
||||
"action": "create",
|
||||
"databaseId": "<DATABASE_ID>",
|
||||
"tableId": "<TABLE_ID>",
|
||||
"rowId": "<ROW_ID>",
|
||||
"data": {
|
||||
"name": "Walter O'Brien"
|
||||
}
|
||||
}
|
||||
] // optional
|
||||
)
|
||||
|
||||
|
|
@ -17,6 +17,7 @@ let row = try await tablesDB.createRow(
|
|||
"age": 30,
|
||||
"isAdmin": false
|
||||
],
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let tablesDB = TablesDB(client)
|
||||
|
||||
let transaction = try await tablesDB.createTransaction(
|
||||
ttl: 60 // optional
|
||||
)
|
||||
|
||||
|
|
@ -12,6 +12,7 @@ let row = try await tablesDB.decrementRowColumn(
|
|||
rowId: "<ROW_ID>",
|
||||
column: "",
|
||||
value: 0, // optional
|
||||
min: 0 // optional
|
||||
min: 0, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ let tablesDB = TablesDB(client)
|
|||
let result = try await tablesDB.deleteRow(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>"
|
||||
rowId: "<ROW_ID>",
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let tablesDB = TablesDB(client)
|
||||
|
||||
let result = try await tablesDB.deleteTransaction(
|
||||
transactionId: "<TRANSACTION_ID>"
|
||||
)
|
||||
|
||||
|
|
@ -10,6 +10,7 @@ let row = try await tablesDB.getRow(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
queries: [] // optional
|
||||
queries: [], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let tablesDB = TablesDB(client)
|
||||
|
||||
let transaction = try await tablesDB.getTransaction(
|
||||
transactionId: "<TRANSACTION_ID>"
|
||||
)
|
||||
|
||||
|
|
@ -12,6 +12,7 @@ let row = try await tablesDB.incrementRowColumn(
|
|||
rowId: "<ROW_ID>",
|
||||
column: "",
|
||||
value: 0, // optional
|
||||
max: 0 // optional
|
||||
max: 0, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ let tablesDB = TablesDB(client)
|
|||
let rowList = try await tablesDB.listRows(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
queries: [] // optional
|
||||
queries: [], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let tablesDB = TablesDB(client)
|
||||
|
||||
let transactionList = try await tablesDB.listTransactions(
|
||||
queries: [] // optional
|
||||
)
|
||||
|
||||
|
|
@ -11,6 +11,7 @@ let row = try await tablesDB.updateRow(
|
|||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:], // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let tablesDB = TablesDB(client)
|
||||
|
||||
let transaction = try await tablesDB.updateTransaction(
|
||||
transactionId: "<TRANSACTION_ID>",
|
||||
commit: false, // optional
|
||||
rollback: false // optional
|
||||
)
|
||||
|
||||
|
|
@ -11,6 +11,7 @@ let row = try await tablesDB.upsertRow(
|
|||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:], // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,4 +18,5 @@ Document result = await databases.createDocument(
|
|||
"isAdmin": false
|
||||
},
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Transaction result = await databases.createOperations(
|
||||
transactionId: '<TRANSACTION_ID>',
|
||||
operations: [
|
||||
{
|
||||
"action": "create",
|
||||
"databaseId": "<DATABASE_ID>",
|
||||
"collectionId": "<COLLECTION_ID>",
|
||||
"documentId": "<DOCUMENT_ID>",
|
||||
"data": {
|
||||
"name": "Walter O'Brien"
|
||||
}
|
||||
}
|
||||
], // optional
|
||||
);
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Transaction result = await databases.createTransaction(
|
||||
ttl: 60, // optional
|
||||
);
|
||||
|
|
@ -13,4 +13,5 @@ Document result = await databases.decrementDocumentAttribute(
|
|||
attribute: '',
|
||||
value: 0, // optional
|
||||
min: 0, // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ await databases.deleteDocument(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
await databases.deleteTransaction(
|
||||
transactionId: '<TRANSACTION_ID>',
|
||||
);
|
||||
|
|
@ -11,4 +11,5 @@ Document result = await databases.getDocument(
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
queries: [], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Transaction result = await databases.getTransaction(
|
||||
transactionId: '<TRANSACTION_ID>',
|
||||
);
|
||||
|
|
@ -13,4 +13,5 @@ Document result = await databases.incrementDocumentAttribute(
|
|||
attribute: '',
|
||||
value: 0, // optional
|
||||
max: 0, // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ DocumentList result = await databases.listDocuments(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
queries: [], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
TransactionList result = await databases.listTransactions(
|
||||
queries: [], // optional
|
||||
);
|
||||
|
|
@ -12,4 +12,5 @@ Document result = await databases.updateDocument(
|
|||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Transaction result = await databases.updateTransaction(
|
||||
transactionId: '<TRANSACTION_ID>',
|
||||
commit: false, // optional
|
||||
rollback: false, // optional
|
||||
);
|
||||
|
|
@ -12,4 +12,5 @@ Document result = await databases.upsertDocument(
|
|||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
TablesDB tablesDB = TablesDB(client);
|
||||
|
||||
Transaction result = await tablesDB.createOperations(
|
||||
transactionId: '<TRANSACTION_ID>',
|
||||
operations: [
|
||||
{
|
||||
"action": "create",
|
||||
"databaseId": "<DATABASE_ID>",
|
||||
"tableId": "<TABLE_ID>",
|
||||
"rowId": "<ROW_ID>",
|
||||
"data": {
|
||||
"name": "Walter O'Brien"
|
||||
}
|
||||
}
|
||||
], // optional
|
||||
);
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue