From b7a16a2ca03363ecbcd5770b2e509d25193799a8 Mon Sep 17 00:00:00 2001 From: Wen Yu Ge Date: Tue, 28 Jun 2022 06:34:57 -0400 Subject: [PATCH 1/3] Fix indentation in database guide --- app/views/docs/database.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/docs/database.phtml b/app/views/docs/database.phtml index 36d10bfb6..6b885e308 100644 --- a/app/views/docs/database.phtml +++ b/app/views/docs/database.phtml @@ -426,7 +426,7 @@ func main() async throws { To ensure the best performance, Appwrite requires an index for every query. You can create an index by navigating to the Indexes tab of your collection or by using your favorite Server SDK. If you plan to query multiple attributes in a single query, you will need an index with all queried attributes.

-

It should be noted that Appwrite's database was designed to protect your queries from performing a full-table scan as this is a footgun and could cause catastrophic performance degregation as you scale up your Appwrite project.

+

It should be noted that Appwrite's database was designed to protect your queries from performing a full-table scan as this is a footgun and could cause catastrophic performance degradation as you scale up your Appwrite project.

The following indexes are currently supported:

From a5749b7736c2ec12d7845ef93bf829f5b5870874 Mon Sep 17 00:00:00 2001 From: Wen Yu Ge Date: Tue, 28 Jun 2022 06:43:25 -0400 Subject: [PATCH 2/3] fixes more indentation and typos --- app/views/docs/database.phtml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/views/docs/database.phtml b/app/views/docs/database.phtml index 6b885e308..51b9aab5b 100644 --- a/app/views/docs/database.phtml +++ b/app/views/docs/database.phtml @@ -112,8 +112,7 @@ promise.then(function (response) { console.log(response); // Success }, function (error) { console.log(error); // Failure -}); - +});
  • @@ -129,8 +128,7 @@ void main() async { } on AppwriteException catch(e) { print(e); } -} - +}
  • @@ -206,8 +204,7 @@ func main() async throws { sdk.database.listDocuments('movies', [ Query.equal('title', 'Avatar') -]); - +]);
  • @@ -226,8 +223,7 @@ void main() async { } on AppwriteException catch(e) { print(e); } -} - +}
  • @@ -330,10 +326,9 @@ func main() async throws{

    Web

    sdk.database.listDocuments('movies', [
    -            Query.equal('title', ['Avatar', 'Lord of the Rings']),
    -            Query.greater('year', 1999)
    -        ]);
    -        
    + Query.equal('title', ['Avatar', 'Lord of the Rings']), + Query.greater('year', 1999) +]);
  • From b0fff5885e164f74269f506241f4ab7a795a3072 Mon Sep 17 00:00:00 2001 From: Wen Yu Ge Date: Tue, 28 Jun 2022 06:44:00 -0400 Subject: [PATCH 3/3] fixes relative link by removing unecessary id --- app/views/docs/database.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/docs/database.phtml b/app/views/docs/database.phtml index 51b9aab5b..3a4d1d7dd 100644 --- a/app/views/docs/database.phtml +++ b/app/views/docs/database.phtml @@ -191,7 +191,7 @@ func main() async throws {

    Indexes Required

    -

    You can only query correctly indexed queries. You can easily add new indexes from both the Appwrite console or one of the server SDKs. Appwrite uses this limitation to enforce optimized queries for maximum performance and scalability of your collection. You can learn more about it on the Appwrite Indexes section.

    +

    You can only query correctly indexed queries. You can easily add new indexes from both the Appwrite console or one of the server SDKs. Appwrite uses this limitation to enforce optimized queries for maximum performance and scalability of your collection. You can learn more about it on the Appwrite Indexes section.

    To find specific documents in a collection, pass an array of query strings as a parameter to the listDocuments endpoint. The SDKs provide a Query class to make query building simpler: