Skip to content

Swap database terminologies #2134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open

Swap database terminologies #2134

wants to merge 32 commits into from

Conversation

ItzNotABug
Copy link
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@ItzNotABug ItzNotABug self-assigned this Jun 23, 2025
Copy link

appwrite bot commented Jun 23, 2025

appwrite.io

Project ID: 684969cb000a2f6c0a02

Sites (1)
Site Status Logs Preview QR
 website
68496a17000f03d62013
Building Building View Logs Preview URL QR Code

Note

You can use Avatars API to generate QR code for any text or URLs.

@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Jun 24, 2025

The preview deployment failed. 🔴

Open Build Logs

Last updated at: 2025-08-20 13:01:02 CET

@TorstenDittmann TorstenDittmann force-pushed the main branch 5 times, most recently from 6e3c6b4 to 83e3ebc Compare July 7, 2025 15:18
Copy link
Member Author

@ItzNotABug ItzNotABug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adityaoberai left comments.


result = databases.increment_document_attribute(
result = grids.increment_document_attribute(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

documentId = "<DOCUMENT_ID>",
attribute = "likes",
value = 1
)

// Then, update other fields
val updateResult = databases.updateDocument(
val updateResult = grids.updateDocument(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateRow

@@ -0,0 +1,306 @@
---
layout: article
title: Tables
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grids.

Comment on lines 84 to 86
$databases = new Grids($client);

$result = $databases->createTable('<DATABASE_ID>', '<TABLE_ID>', '<NAME>');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$grids

```
```kotlin
import io.appwrite.Client
import io.appwrite.services.Databases
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grids

grids.createTable(
"<DATABASE_ID>",
"<TABLE_ID>",
"[NAME]",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use <> for placeholders

@@ -288,7 +288,7 @@ export default async function ({ req, res }) {
return res.json({ ok: false, message: 'You have already voted on this topic.' }, 400);
}

const voteDocument = await database.createDocument('[VOTES_COLLECTION_ID]', {
const voteDocument = await database.createDocument('<VOTES_COLLECTION_ID>', {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grids api examples on the whole page.

@adityaoberai adityaoberai force-pushed the databases-terminologies branch from af88057 to b08b6c0 Compare August 20, 2025 08:28
Copy link
Member Author

@ItzNotABug ItzNotABug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments, @adityaoberai

@@ -113,7 +113,7 @@ More information and examples of authenticating users can be found in the dedica

# Database queries {% #database-queries %}

The GraphQL API can be used to query and manipulate database documents. For detailed examples of how to create, list, update, and delete documents using GraphQL, refer to the [Documents documentation](/docs/products/databases/documents).
The GraphQL API can be used to query and manipulate database rows. For detailed examples of how to create, list, update, and delete rows using GraphQL, refer to the [Documents documentation](/docs/products/databases/rows).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The GraphQL API can be used to query and manipulate database rows. For detailed examples of how to create, list, update, and delete rows using GraphQL, refer to the [Documents documentation](/docs/products/databases/rows).
The GraphQL API can be used to query and manipulate database rows. For detailed examples of how to create, list, update, and delete rows using GraphQL, refer to the [Rows documentation](/docs/products/databases/rows).


client
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<PROJECT_ID>') // Your project ID
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
;

const promise = databases.create('<DATABASE_ID>', '[NAME]');
const promise = tablesDb.createDatabase('<DATABASE_ID>', '<NAME>');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const promise = tablesDb.createDatabase('<DATABASE_ID>', '<NAME>');
const promise = tablesDb.create('<DATABASE_ID>', '<NAME>');

@@ -54,7 +54,7 @@ client
;


let promise = databases.create('<DATABASE_ID>', '[NAME]');
let promise = tablesDb.createTable('<DATABASE_ID>', '<NAME>');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let promise = tablesDb.createTable('<DATABASE_ID>', '<NAME>');
let promise = tablesDb.create('<DATABASE_ID>', '<NAME>');


result = databases.create('<DATABASE_ID>', '[NAME]')
result = tablesDb.create_database('<DATABASE_ID>', '<NAME>')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
result = tablesDb.create_database('<DATABASE_ID>', '<NAME>')
result = tablesDb.create('<DATABASE_ID>', '<NAME>')


response = databases.create(database_id: '<DATABASE_ID>', name: '[NAME]')
response = tablesDb.create_database(database_id: '<DATABASE_ID>', name: '<NAME>')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
response = tablesDb.create_database(database_id: '<DATABASE_ID>', name: '<NAME>')
response = tablesDb.create(database_id: '<DATABASE_ID>', name: '<NAME>')


val response = databases.create(
val response = tablesDb.createDatabase(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val response = tablesDb.createDatabase(
val response = tablesDb.create(


databases.create(
tablesDb.createDatabase(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tablesDb.createDatabase(
tablesDb.create(


let database = try await databases.create(
let response = try await tablesDb.createDatabase(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let response = try await tablesDb.createDatabase(
let response = try await tablesDb.create(

@@ -84,7 +84,7 @@ Server integrations use API keys to authenticate and are typically used for back
Server APIs are authenticated with API keys instead of account sessions. Simply pass an [API key](/docs/advanced/platform/api-keys) in the `X-Appwrite-key: [API-KEY]` header with the appropriate scopes.

```json
GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1
GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paths need to change as well. refer Jake's message on Discord.


todoDatabase = await databases.create(
todoDatabase = await tablesDb.createDatabase(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets make sure createDatabase doesn't exist anywhere for TablesDb API, cc @adityaoberai

@adityaoberai adityaoberai marked this pull request as ready for review August 20, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants