Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API guide #620

Merged
merged 11 commits into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix links
  • Loading branch information
brfrn169 committed Jul 4, 2022
commit 0ee5b0332cbf46f80de04611d6c1d794d6b06c6b
10 changes: 5 additions & 5 deletions docs/api-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This guide briefly explains how to use Scalar DB Java API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's helpful to have indexes like below.

* [Administrative operations](link)
* [Transactional operations](link)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brfrn169 Thank you for the update. But, the link seems not working.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@feeblefakie Sorry for that... 😞 I fixed the broken links. Please take a look again when you have time!

brfrn169 marked this conversation as resolved.
Show resolved Hide resolved

* [Administrative operations](#Administrative operations)
* [Transactional operations](#Transactional operations)
* [Administrative operations](#administrative-operations)
brfrn169 marked this conversation as resolved.
Show resolved Hide resolved
* [Transactional operations](#transactional-operations)

## Administrative operations

Expand Down Expand Up @@ -95,7 +95,7 @@ TableMetadata tableMetadata =

Here you define columns, a partition key, a clustering key including clustering orders, and secondary indexes of a table.

Please see [Scalar DB design document - Data Model](design.md#Data Model) for the details of the Scalar DB Data Model.
Please see [Scalar DB design document - Data Model](design.md#data-model) for the details of the Scalar DB Data Model.

And then, you can create a table as follows:

Expand Down Expand Up @@ -391,7 +391,7 @@ Optional<Result> result = transaction.get(get);
```

Note that if the result has more than one record, the `transaction.get()` throws an exception.
If you want to handle multiple results, use [Scan with a secondary index](#Scan with a secondary index).
If you want to handle multiple results, use [Scan with a secondary index](#scan-with-a-secondary-index).

#### Scan operation

Expand Down Expand Up @@ -606,7 +606,7 @@ You can abort a transaction as follows;
transaction.abort();
```

Please see [Handle Exceptions](#Handle Exceptions) for the details of how to handle exceptions in Scalar DB.
Please see [Handle Exceptions](#handle-exceptions) for the details of how to handle exceptions in Scalar DB.

## Transactional operations for Two-phase Commit Transaction

Expand Down
2 changes: 1 addition & 1 deletion docs/two-phase-commit-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ You need to specify the transaction ID associated with the transaction that the
### CRUD operations for the transaction

The CRUD operations of `TwoPhaseCommitTransacton` are the same as the ones of `DistributedTransaction`.
So please see also [Java API Guide - CRUD operations](api-guide.md#CRUD operations) for the details.
So please see also [Java API Guide - CRUD operations](api-guide.md#crud-operations) for the details.

This is an example code for CRUD operations in Two-phase Commit Transactions:
```java
Expand Down