-
Notifications
You must be signed in to change notification settings - Fork 260
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
base: main
Are you sure you want to change the base?
Conversation
appwrite.ioProject ID: Note You can use Avatars API to generate QR code for any text or URLs. |
The preview deployment failed. 🔴 Last updated at: 2025-08-20 13:01:02 CET |
6e3c6b4
to
83e3ebc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adityaoberai left comments.
src/routes/docs/products/databases/atomic-numeric-operations/+page.markdoc
Outdated
Show resolved
Hide resolved
src/routes/docs/products/databases/atomic-numeric-operations/+page.markdoc
Outdated
Show resolved
Hide resolved
src/routes/docs/products/databases/atomic-numeric-operations/+page.markdoc
Outdated
Show resolved
Hide resolved
|
||
result = databases.increment_document_attribute( | ||
result = grids.increment_document_attribute( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grids.
$databases = new Grids($client); | ||
|
||
$result = $databases->createTable('<DATABASE_ID>', '<TABLE_ID>', '<NAME>'); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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]", |
There was a problem hiding this comment.
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>', { |
There was a problem hiding this comment.
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.
… tutorials and code examples
af88057
to
b08b6c0
Compare
There was a problem hiding this 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val response = tablesDb.createDatabase( | |
val response = tablesDb.create( |
|
||
databases.create( | ||
tablesDb.createDatabase( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tablesDb.createDatabase( | |
tablesDb.create( |
|
||
let database = try await databases.create( | ||
let response = try await tablesDb.createDatabase( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
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.)