Skip to content

Commit 3bd0bb3

Browse files
AUTO: Docs repo sync - ScalarDB (#1102)
* AUTO: Sync ScalarDB docs in English to docs site repo * Add new .NET-related docs --------- Co-authored-by: josh-wong <[email protected]> Co-authored-by: Josh Wong <[email protected]>
1 parent 308f203 commit 3bd0bb3

File tree

9 files changed

+920
-14
lines changed

9 files changed

+920
-14
lines changed

docs/api-guide.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ displayed_sidebar: docsEnglish
88

99
# ScalarDB Java API Guide
1010

11+
import JavadocLink from '/src/theme/JavadocLink.js';
1112
import Tabs from '@theme/Tabs';
1213
import TabItem from '@theme/TabItem';
1314

@@ -540,7 +541,7 @@ In the `where()` condition method chain, the conditions must be an AND-wise junc
540541

541542
:::
542543

543-
For more details about available conditions and condition sets, see the `ConditionBuilder` and `ConditionSetBuilder` page in the [Javadoc](https://javadoc.io/doc/com.scalar-labs/scalardb/latest/index.html) of the version of ScalarDB that you're using.
544+
For more details about available conditions and condition sets, see the <JavadocLink packageName="scalardb" path="com/scalar/db/api" className="ConditionBuilder" /> and <JavadocLink packageName="scalardb" path="com/scalar/db/api" className="ConditionSetBuilder" /> pages in the Javadoc.
544545

545546
###### Handle `Result` objects
546547

@@ -593,7 +594,7 @@ And if you need to check if a value of a column is null, you can use the `isNull
593594
boolean isNull = result.isNull("<COLUMN_NAME>");
594595
```
595596

596-
For more details, see the `Result` page in the [Javadoc](https://javadoc.io/doc/com.scalar-labs/scalardb/3.15.1/index.html) of the version of ScalarDB that you're using.
597+
For more details, see the <JavadocLink packageName="scalardb" path="com/scalar/db/api" className="Result" /> page in the Javadoc.
597598

598599
###### Execute `Get` by using a secondary index
599600

@@ -688,7 +689,7 @@ In the `where()` condition method chain, the conditions must be an AND-wise junc
688689

689690
:::
690691

691-
For more details about available conditions and condition sets, see the `ConditionBuilder` and `ConditionSetBuilder` page in the [Javadoc](https://javadoc.io/doc/com.scalar-labs/scalardb/latest/index.html) of the version of ScalarDB that you're using.
692+
For more details about available conditions and condition sets, see the <JavadocLink packageName="scalardb" path="com/scalar/db/api" className="ConditionBuilder" /> and <JavadocLink packageName="scalardb" path="com/scalar/db/api" className="ConditionSetBuilder" /> pages in the Javadoc.
692693

693694
###### Execute `Scan` by using a secondary index
694695

docs/scalardb-cluster-dotnet-client-sdk/getting-started-with-aspnet-and-di.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ displayed_sidebar: docsEnglish
77

88
# Getting Started with ASP.NET Core and Dependency Injection in the ScalarDB Cluster .NET Client SDK
99

10-
The ScalarDB Cluster .NET Client SDK supports Dependency Injection in frameworks like ASP.NET Core.
10+
The ScalarDB Cluster .NET Client SDK supports dependency injection (DI) in frameworks like ASP.NET Core.
1111

1212
## Install the SDK
1313

@@ -34,7 +34,7 @@ For details about settings files and other ways to configure the client, see [Cl
3434

3535
## Set up the transaction managers
3636

37-
You can register the ScalarDB transaction managers as services in `IServiceCollection` as follows:
37+
You can register the ScalarDB transaction managers in the DI container as follows:
3838

3939
```c#
4040
using ScalarDB.Client.Extensions;
@@ -48,6 +48,12 @@ var builder = WebApplication.CreateBuilder(args);
4848
builder.Services.AddScalarDb();
4949
```
5050

51+
:::note
52+
53+
The ScalarDB transaction managers will be registered as transient services. For details about service lifetimes, see [.NET dependency injection - Service lifetimes](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#service-lifetimes).
54+
55+
:::
56+
5157
After registering the transaction managers, they can be injected into the controller's constructor as follows:
5258

5359
```c#

docs/scalardb-cluster-dotnet-client-sdk/getting-started-with-linq.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Create a context class that has properties for all the tables you want to use. F
101101
}
102102
```
103103

104-
After all the classes are created, you need to add the created context to the Dependency Injection. For example:
104+
After all the classes are created, you need to register the created context in the dependency injection container. For example:
105105

106106
```c#
107107
using ScalarDB.Client.Extensions;
@@ -115,6 +115,12 @@ var builder = WebApplication.CreateBuilder(args);
115115
builder.Services.AddScalarDbContext<MyDbContext>();
116116
```
117117

118+
:::note
119+
120+
The context class will be registered as a transient service. For details about service lifetimes, see [.NET dependency injection - Service lifetimes](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#service-lifetimes).
121+
122+
:::
123+
118124
The context can be injected into the controller's constructor as follows:
119125

120126
```c#

docs/scalardb-cluster/getting-started-with-scalardb-cluster-graphql.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ displayed_sidebar: docsEnglish
66

77
# Getting Started with ScalarDB Cluster GraphQL
88

9+
import JavadocLink from '/src/theme/JavadocLink.js';
10+
911
This tutorial describes how to use ScalarDB Cluster GraphQL.
1012

1113
## Prerequisites
@@ -186,8 +188,7 @@ You should get the following result in the right pane:
186188

187189
### Mappings between GraphQL API and ScalarDB Java API
188190

189-
The automatically generated GraphQL schema defines queries, mutations, and object types for input/output to allow you to run CRUD operations for all the tables in the target namespaces.
190-
These operations are designed to match the ScalarDB APIs defined in the [`DistributedTransaction`](https://javadoc.io/doc/com.scalar-labs/scalardb/3.15.1/com/scalar/db/api/DistributedTransaction.html) interface.
191+
The automatically generated GraphQL schema defines queries, mutations, and object types for input/output to allow you to run CRUD operations for all the tables in the target namespaces. These operations are designed to match the ScalarDB APIs defined in the <JavadocLink packageName="scalardb" path="com/scalar/db/api" className="DistributedTransaction" /> interface.
191192

192193
Assuming you have an `account` table in a namespace, the following queries and mutations will be generated:
193194

0 commit comments

Comments
 (0)