Skip to content

Conversation

@adityaoberai
Copy link
Member

@adityaoberai adityaoberai commented Dec 26, 2025

What does this PR do?

Updates createTable code examples to demonstrate full schema creation

Test Plan

Visit /docs/products/tablesdb/tables

Related PRs and Issues

N/A

Have you read the Contributing Guidelines on issues?

Yes

Summary by CodeRabbit

  • Documentation
    • Updated createTable method examples across all SDKs (Node.js, Deno, PHP, Python, Ruby, Java, Kotlin, Dart, C#, Swift) to demonstrate explicit column and index definitions when creating tables.
    • Refined documentation formatting and clarity.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

Walkthrough

This pull request updates documentation code examples in the database tables section across nine language SDKs (Node.js, Deno, PHP, Python, Ruby, Java, Kotlin, Dart, and C#). All createTable method invocations are modified to include columns and indexes parameters alongside the existing databaseId, tableId, and name parameters. The examples now demonstrate creating tables with explicit column definitions (email and name fields with type and constraint specifications) and a unique index on the email column. Additionally, a minor punctuation correction updates documentation text from "in the createTable method, learn more" to "in the createTable method. Learn more".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and concisely describes the main change: updating createTable code examples to include columns and indexes across multiple language SDKs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-full-schema-creation-docs

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be431fd and 6410da9.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • src/routes/docs/products/databases/tables/+page.markdoc
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-05T19:35:04.162Z
Learnt from: ebenezerdon
Repo: appwrite/website PR: 2372
File: src/routes/docs/tutorials/nuxt/step-6/+page.markdoc:79-83
Timestamp: 2025-09-05T19:35:04.162Z
Learning: In Nuxt tutorial files, the correct Appwrite database instance to use is `tablesDB` (imported from "~/appwrite"), not `database`. All tablesDB method calls should use the object parameter format: listRows({ databaseId, tableId, queries }), createRow({ databaseId, tableId, rowId, data }), and deleteRow({ databaseId, tableId, rowId }).

Applied to files:

  • src/routes/docs/products/databases/tables/+page.markdoc
📚 Learning: 2025-09-05T19:35:53.943Z
Learnt from: ebenezerdon
Repo: appwrite/website PR: 2372
File: src/routes/docs/tutorials/react/step-6/+page.markdoc:70-75
Timestamp: 2025-09-05T19:35:53.943Z
Learning: In React tutorial files, the correct Appwrite database instance to import is `tablesDB` from "../appwrite", not `databases`. The import statement should be `import { tablesDB } from "../appwrite"` to match the usage throughout the React tutorial code.

Applied to files:

  • src/routes/docs/products/databases/tables/+page.markdoc
📚 Learning: 2025-09-05T19:35:59.449Z
Learnt from: ebenezerdon
Repo: appwrite/website PR: 2372
File: src/routes/docs/tutorials/react-native/step-6/+page.markdoc:67-73
Timestamp: 2025-09-05T19:35:59.449Z
Learning: In React Native tutorials, the lib/appwrite.js file exports `tablesDB` (not `databases`), so imports should use `import { tablesDB } from "../lib/appwrite"` to match the export pattern established in step-3.

Applied to files:

  • src/routes/docs/products/databases/tables/+page.markdoc
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: assets
  • GitHub Check: build
  • GitHub Check: tests
🔇 Additional comments (11)
src/routes/docs/products/databases/tables/+page.markdoc (11)

86-110: Deno example is consistent with Node.js.

The Deno example correctly mirrors the Node.js implementation, which is appropriate since it imports from npm:node-appwrite. The syntax and structure match perfectly.


134-158: PHP example uses modern named parameter syntax.

The example correctly uses PHP 8.0+ named parameter syntax with associative arrays for columns and indexes. The structure is clean and idiomatic.


174-198: Python example follows language conventions correctly.

The example properly uses snake_case parameter naming (database_id, table_id, create_table) and capitalized Boolean values (True), which are correct Python conventions. The list of dictionaries structure is clean and idiomatic.


212-236: Ruby example uses idiomatic syntax.

The example correctly uses Ruby's symbol syntax for hash keys and named parameters. The structure is clean and follows Ruby conventions.


255-280: C# example demonstrates proper type-safe collection usage.

The example correctly uses List<Dictionary<string, object>> with proper initialization syntax. The nested List<string> for the attributes array shows good attention to type safety.


299-318: Dart example follows Dart formatting conventions.

The example uses proper Dart syntax with lists of maps. The trailing comma on line 318 is intentional and follows Dart's recommended formatting style for better diffs and formatting consistency.


344-363: Kotlin example uses idiomatic collection builders.

The example correctly uses listOf and mapOf with named parameter syntax, which is the standard Kotlin approach. The structure is clean and type-safe.


370-415: Java example demonstrates clear structure with variable extraction.

The addition of import java.util.*; is necessary for the HashMap and Arrays classes. Extracting columns and indexes into separate variables improves readability. The double-brace initialization pattern creates anonymous inner classes, which is generally acceptable for documentation examples where the code is meant to be illustrative rather than production-ready.


430-450: Swift example uses proper Swift collection syntax.

The example correctly uses Swift's array and dictionary literal syntax. The structure is consistent with the other language examples and leverages Swift's type inference appropriately.


455-455: Punctuation correction improves readability.

The change from a comma to a period properly separates the statement about permissions configuration from the directive to learn more. This improves clarity and follows standard punctuation guidelines.


39-63: Node.js example correctly demonstrates schema creation with columns and indexes.

The updated examples across all supported SDKs (Node.js, Deno, PHP, Python, Ruby, C#, Dart, Kotlin, Java, Swift) consistently show createTable accepting columns and indexes parameters, indicating these are officially supported features.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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