Skip to content

Commit 6f9e0b0

Browse files
AUTO: Sync ScalarDB docs in Japanese to docs site repo (#1057)
Co-authored-by: josh-wong <[email protected]>
1 parent de4c552 commit 6f9e0b0

File tree

1 file changed

+40
-9
lines changed
  • i18n/versioned_docs/ja-jp/docusaurus-plugin-content-docs/current/scalardb-cluster-dotnet-client-sdk

1 file changed

+40
-9
lines changed

i18n/versioned_docs/ja-jp/docusaurus-plugin-content-docs/current/scalardb-cluster-dotnet-client-sdk/common-reference.mdx

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,43 @@ builder.Services.AddScalarDbContext<MyDbContext>(options =>
156156

157157
次の表に、型がどのように変換されるかを示します。
158158

159-
| ScalarDB 型 | .NET 型 | C# エイリアス |
160-
|------------|----------------------------|-------------|
161-
| TEXT | System.String | string |
162-
| INT | System.Int32 | int |
163-
| BIGINT | System.Int64 | long |
164-
| FLOAT | System.Single | float |
165-
| DOUBLE | System.Double | double |
166-
| BOOLEAN | System.Boolean | bool |
167-
| BLOB | Google.Protobuf.ByteString | |
159+
| ScalarDB 型 | .NET 型 | C# エイリアス |
160+
|-------------|----------------------------|----------|
161+
| TEXT | System.String | string |
162+
| INT | System.Int32 | int |
163+
| BIGINT | System.Int64 | long |
164+
| FLOAT | System.Single | float |
165+
| DOUBLE | System.Double | double |
166+
| BOOLEAN | System.Boolean | bool |
167+
| BLOB | Google.Protobuf.ByteString | |
168+
| DATE | NodaTime.LocalDate | |
169+
| TIME | NodaTime.LocalTime | |
170+
| TIMESTAMP | NodaTime.LocalDateTime | |
171+
| TIMESTAMPTZ | NodaTime.Instant | |
172+
173+
:::note
174+
175+
ScalarDB Cluster .NET Client SDK は、`BLOB` 型には [Google.Protobuf](https://www.nuget.org/packages/Google.Protobuf) を使用し、時間関連の型には [NodaTime](https://www.nuget.org/packages/NodaTime) を使用します。
176+
177+
:::
178+
179+
:::warning
180+
181+
.NET の時間関連型の精度は、ScalarDB でサポートされている精度よりも高くなります。そのため、外部ソースから受信した時間関連の値を保存するときは注意が必要です。ScalarDB Cluster .NET Client SDK には、次の方法で時間関連の値の精度を下げるために使用できる `WithScalarDbPrecision` 拡張メソッドが含まれています:
182+
183+
```c#
184+
using ScalarDB.Client.Extensions;
185+
186+
// ...
187+
188+
var updatedAt = Instant.FromDateTimeUtc(DateTime.UtcNow)
189+
.WithScalarDbPrecision();
190+
191+
// using NodaTime to get current instant
192+
updatedAt = clockInstance.GetCurrentInstant()
193+
.WithScalarDbPrecision();
194+
```
195+
196+
ScalarDB の値の範囲と精度の詳細については、[ScalarDB と他のデータベース間のデータ型マッピング](../schema-loader.mdx#scalardb-と他のデータベース間のデータ型マッピング)を参照してください。
197+
198+
:::

0 commit comments

Comments
 (0)