Skip to content

Commit a74f3f4

Browse files
committed
AUTO: Sync ScalarDB docs in English to docs site repo
1 parent 3116aa5 commit a74f3f4

37 files changed

+525
-617
lines changed

docs/api-guide.mdx

Lines changed: 8 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,14 @@ DistributedTransaction transaction = transactionManager.start();
370370
Alternatively, you can use the `begin` method for a transaction by specifying a transaction ID as follows:
371371

372372
```java
373-
// Begin a transaction by specifying a transaction ID.
373+
// Begin a transaction with specifying a transaction ID.
374374
DistributedTransaction transaction = transactionManager.begin("<TRANSACTION_ID>");
375375
```
376376

377377
Or, you can use the `start` method for a transaction by specifying a transaction ID as follows:
378378

379379
```java
380-
// Start a transaction by specifying a transaction ID.
380+
// Start a transaction with specifying a transaction ID.
381381
DistributedTransaction transaction = transactionManager.start("<TRANSACTION_ID>");
382382
```
383383

@@ -389,48 +389,6 @@ When you specify a transaction ID, make sure you specify a unique ID (for exampl
389389

390390
:::
391391

392-
##### Begin or start a transaction in read-only mode
393-
394-
You can also begin or start a transaction in read-only mode. In this case, the transaction will not allow any write operations, and it will be optimized for read operations.
395-
396-
:::note
397-
398-
Using read-only transactions for read-only operations is strongly recommended to improve performance and reduce resource usage.
399-
400-
:::
401-
402-
You can begin or start a transaction in read-only mode as follows:
403-
404-
```java
405-
// Begin a transaction in read-only mode.
406-
DistributedTransaction transaction = transactionManager.beginReadOnly();
407-
```
408-
409-
```java
410-
// Start a transaction in read-only mode.
411-
DistributedTransaction transaction = transactionManager.startReadOnly();
412-
```
413-
414-
Alternatively, you can use the `beginReadOnly` and `startReadOnly` methods by specifying a transaction ID as follows:
415-
416-
```java
417-
// Begin a transaction in read-only mode by specifying a transaction ID.
418-
DistributedTransaction transaction = transactionManager.beginReadOnly("<TRANSACTION_ID>");
419-
```
420-
421-
```java
422-
// Start a transaction in read-only mode by specifying a transaction ID.
423-
DistributedTransaction transaction = transactionManager.startReadOnly("<TRANSACTION_ID>");
424-
```
425-
426-
:::note
427-
428-
Specifying a transaction ID is useful when you want to link external systems to ScalarDB. Otherwise, you should use the `beginReadOnly()` method or the `startReadOnly()` method.
429-
430-
When you specify a transaction ID, make sure you specify a unique ID (for example, UUID v4) throughout the system since ScalarDB depends on the uniqueness of transaction IDs for correctness.
431-
432-
:::
433-
434392
#### Join a transaction
435393

436394
Joining a transaction is particularly useful in a stateful application where a transaction spans multiple client requests. In such a scenario, the application can start a transaction during the first client request. Then, in subsequent client requests, the application can join the ongoing transaction by using the `join()` method.
@@ -671,14 +629,9 @@ If the result has more than one record, `transaction.get()` will throw an except
671629

672630
##### `Scan` operation
673631

674-
`Scan` is an operation to retrieve multiple records within a partition. You can specify clustering-key boundaries and orderings for clustering-key columns in `Scan` operations. To execute a `Scan` operation, you can use the `transaction.scan()` method or the `transaction.getScanner()` method:
675-
676-
- `transaction.scan()`:
677-
- This method immediately executes the given `Scan` operation and returns a list of all matching records. It is suitable when the result set is expected to be small enough to fit in memory.
678-
- `transaction.getScanner()`:
679-
- This method returns a `Scanner` object that allows you to iterate over the result set lazily. It is useful when the result set may be large, as it avoids loading all records into memory at once.
632+
`Scan` is an operation to retrieve multiple records within a partition. You can specify clustering-key boundaries and orderings for clustering-key columns in `Scan` operations.
680633

681-
You need to create a `Scan` object first, and then you can execute the object by using the `transaction.scan()` method or the `transaction.getScanner()` method as follows:
634+
You need to create a `Scan` object first, and then you can execute the object by using the `transaction.scan()` method as follows:
682635

683636
```java
684637
// Create a `Scan` operation.
@@ -699,17 +652,8 @@ Scan scan =
699652
.limit(10)
700653
.build();
701654

702-
// Execute the `Scan` operation by using the `transaction.scan()` method.
655+
// Execute the `Scan` operation.
703656
List<Result> results = transaction.scan(scan);
704-
705-
// Or, execute the `Scan` operation by using the `transaction.getScanner()` method.
706-
try (TransactionCrudOperable.Scanner scanner = transaction.getScanner(scan)) {
707-
// Fetch the next result from the scanner
708-
Optional<Result> result = scanner.one();
709-
710-
// Fetch all remaining results from the scanner
711-
List<Result> allResults = scanner.all();
712-
}
713657
```
714658

715659
You can omit the clustering-key boundaries or specify either a `start` boundary or an `end` boundary. If you don't specify `orderings`, you will get results ordered by the clustering order that you defined when creating the table.
@@ -1348,14 +1292,9 @@ For details about the `Get` operation, see [`Get` operation](#get-operation).
13481292

13491293
#### Execute `Scan` operation
13501294

1351-
`Scan` is an operation to retrieve multiple records within a partition. You can specify clustering-key boundaries and orderings for clustering-key columns in `Scan` operations. To execute a `Scan` operation, you can use the `transactionManager.scan()` method or the `transactionManager.getScanner()` method:
1352-
1353-
- `transactionManager.scan()`:
1354-
- This method immediately executes the given `Scan` operation and returns a list of all matching records. It is suitable when the result set is expected to be small enough to fit in memory.
1355-
- `transactionManager.getScanner()`:
1356-
- This method returns a `Scanner` object that allows you to iterate over the result set lazily. It is useful when the result set may be large, as it avoids loading all records into memory at once.
1295+
`Scan` is an operation to retrieve multiple records within a partition. You can specify clustering-key boundaries and orderings for clustering-key columns in `Scan` operations.
13571296

1358-
You need to create a `Scan` object first, and then you can execute the object by using the `transactionManager.scan()` method or the `transactionManager.getScanner()` method as follows:
1297+
You need to create a `Scan` object first, and then you can execute the object by using the `transactionManager.scan()` method as follows:
13591298

13601299
```java
13611300
// Create a `Scan` operation.
@@ -1375,17 +1314,8 @@ Scan scan =
13751314
.limit(10)
13761315
.build();
13771316

1378-
// Execute the `Scan` operation by using the `transactionManager.scan()` method.
1317+
// Execute the `Scan` operation.
13791318
List<Result> results = transactionManager.scan(scan);
1380-
1381-
// Or, execute the `Scan` operation by using the `transactionManager.getScanner()` method.
1382-
try (TransactionManagerCrudOperable.Scanner scanner = transactionManager.getScanner(scan)) {
1383-
// Fetch the next result from the scanner
1384-
Optional<Result> result = scanner.one();
1385-
1386-
// Fetch all remaining results from the scanner
1387-
List<Result> allResults = scanner.all();
1388-
}
13891319
```
13901320

13911321
For details about the `Scan` operation, see [`Scan` operation](#scan-operation).

docs/backup-restore.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ The backup methods by database listed below are just examples of some of the dat
6666
<TabItem value="YugabyteDB_Managed" label="YugabyteDB Managed">
6767
Clusters are backed up automatically based on the backup policy, and these backups are retained for a specific duration. You can also perform on-demand backups. For details on performing backups, see [YugabyteDB Managed: Back up and restore clusters](https://docs.yugabyte.com/preview/yugabyte-cloud/cloud-clusters/backup-clusters/).
6868
</TabItem>
69-
<TabItem value="Db2" label="Db2">
70-
Use the `backup` command. For details, on performing backups, see [Db2: Backup overview](https://www.ibm.com/docs/en/db2/12.1.0?topic=recovery-backup).
71-
</TabItem>
7269
</Tabs>
7370

7471
### Back up with explicit pausing
@@ -178,7 +175,4 @@ The restore methods by database listed below are just examples of some of the da
178175
<TabItem value="YugabyteDB_Managed" label="YugabyteDB Managed">
179176
You can restore from the scheduled or on-demand backup within the backup retention period. For details on performing backups, see [YugabyteDB Managed: Back up and restore clusters](https://docs.yugabyte.com/preview/yugabyte-cloud/cloud-clusters/backup-clusters/).
180177
</TabItem>
181-
<TabItem value="Db2" label="Db2">
182-
Use the `restore` command. For details, on restoring the database, see [Db2: Restore overview](https://www.ibm.com/docs/en/db2/12.1.0?topic=recovery-restore).
183-
</TabItem>
184178
</Tabs>

0 commit comments

Comments
 (0)