Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions app/views/docs/database.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
</code></pre>
});</code></pre>
</div>
</li>
<li>
Expand All @@ -129,8 +128,7 @@ void main() async {
} on AppwriteException catch(e) {
print(e);
}
}
</code></pre>
}</code></pre>
</div>
</li>
<li>
Expand Down Expand Up @@ -193,7 +191,7 @@ func main() async throws {

<div class="notice margin-top-large margin-bottom-large">
<h4>Indexes Required</h4>
<p>You can only query correctly indexed queries. You can easily add new indexes from both the Appwrite console or one of the <a href="/docs/sdks#server" target="_blank">server SDKs</a>. Appwrite uses this limitation to enforce optimized queries for maximum performance and scalability of your collection. You can learn more about it on the <a href="/docs/database#indexes" id="indexes">Appwrite Indexes</a> section.</p>
<p>You can only query correctly indexed queries. You can easily add new indexes from both the Appwrite console or one of the <a href="/docs/sdks#server" target="_blank">server SDKs</a>. Appwrite uses this limitation to enforce optimized queries for maximum performance and scalability of your collection. You can learn more about it on the <a href="/docs/database#indexes">Appwrite Indexes</a> section.</p>
</div>
<p>
To find specific documents in a collection, pass an array of query strings as a parameter to the <a href="/docs/server/database#databaseListDocuments">listDocuments</a> endpoint. The SDKs provide a <b>Query</b> class to make query building simpler:
Expand All @@ -206,8 +204,7 @@ func main() async throws {

sdk.database.listDocuments('movies', [
Query.equal('title', 'Avatar')
]);
</code></pre>
]);</code></pre>
</div>
</li>
<li>
Expand All @@ -226,8 +223,7 @@ void main() async {
} on AppwriteException catch(e) {
print(e);
}
}
</code></pre>
}</code></pre>
</div>
</li>
<li>
Expand Down Expand Up @@ -330,10 +326,9 @@ func main() async throws{
<h3>Web</h3>
<div class="ide" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>sdk.database.listDocuments('movies', [
Query.equal('title', ['Avatar', 'Lord of the Rings']),
Query.greater('year', 1999)
]);
</code></pre>
Query.equal('title', ['Avatar', 'Lord of the Rings']),
Query.greater('year', 1999)
]);</code></pre>
</div>
</li>
<li>
Expand Down Expand Up @@ -426,7 +421,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 <b>Indexes</b> 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 <b>all</b> queried attributes.
</p>
<p>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.</p>
<p>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.</p>
<p>
The following indexes are currently supported:
</p>
Expand Down