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

Add API guide #620

merged 11 commits into from
Jul 4, 2022

Conversation

brfrn169
Copy link
Collaborator

@brfrn169 brfrn169 commented Jun 28, 2022

Since the next minor release (3.6) will have a lot of API changes (while preserving the backward compatibility), I think we should add an API guide for the new API. This PR adds it. Please take a look!

@brfrn169 brfrn169 self-assigned this Jun 28, 2022
@@ -0,0 +1,697 @@
# Java API Guide
Copy link
Collaborator Author

@brfrn169 brfrn169 Jun 28, 2022

Choose a reason for hiding this comment

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

Added Java API Guide for the new API.


Please see [Two-phase Commit Transactions](two-phase-commit-transactions.md).

## Handle Exceptions
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved the A Guide on How to Handle Exceptions here.

docs/design.md Outdated
Comment on lines 43 to 54
### Clustering order

As mentioned, records in Scalar DB are sorted by the clustering-key in a partition.
You can specify the default sort orders of the clustering-key, that's called clustering orders, when you create tables.
If the clustering-key consists of multiple columns, you can specify clustering order for each column.

### Secondary index

In Scalar DB, you can basically scan a table only using columns that are part of the primary key.
Secondary Indexes in Scalar DB solve the need for querying columns that are not part of the primary key.
You can create a secondary index on a single column on a table.
Secondary indexes are used to scan a table using a column that is not normally queryable.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added clustering order thing and secondary index thing here.

@brfrn169 brfrn169 requested review from Torch3333 and feeblefakie and removed request for Torch3333 June 28, 2022 07:43
Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

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

Overall, it looks good. It's a very complete and concise guide explaining Scalar DB capabilities.
I left some suggestions. Please have a look when you can.

docs/api-guide.md Outdated Show resolved Hide resolved
docs/api-guide.md Outdated Show resolved Hide resolved
docs/api-guide.md Outdated Show resolved Hide resolved
docs/api-guide.md Outdated Show resolved Hide resolved
docs/api-guide.md Outdated Show resolved Hide resolved
docs/design.md Outdated Show resolved Hide resolved
docs/api-guide.md Outdated Show resolved Hide resolved
docs/api-guide.md Outdated Show resolved Hide resolved
brfrn169 and others added 2 commits June 29, 2022 13:37
Co-authored-by: Vincent Guilpain <vincent.guilpain@scalar-labs.com>
@brfrn169
Copy link
Collaborator Author

brfrn169 commented Jun 29, 2022

@Torch3333 Thank you for the suggestions! I fixed it based on your feedback in the latest commit. Please take a look again when you have time!

@brfrn169 brfrn169 requested a review from Torch3333 June 29, 2022 04:46
Torch3333
Torch3333 previously approved these changes Jun 29, 2022
Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

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

Thank you, LGTM.
I just left a last suggestion. Please take a look.

docs/api-guide.md Outdated Show resolved Hide resolved
brfrn169 and others added 2 commits June 29, 2022 14:00
Co-authored-by: Vincent Guilpain <vincent.guilpain@scalar-labs.com>
Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

Overall looking good! Thank you!
Left minor comments.


## Administrative operations

This chapter explains how to execute administrative operations in Scalar DB.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This chapter explains how to execute administrative operations in Scalar DB.
This section explains how to execute administrative operations in Scalar DB. You can execute administrative operations programmatically as follows, but you can also execute those operations through [the Schema Loader](link).

@@ -0,0 +1,718 @@
# Java API Guide

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!


## Transactional operations

This chapter explains how to execute transactional operations in Scalar DB.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This chapter explains how to execute transactional operations in Scalar DB.
This section explains how to execute transactional operations in Scalar DB.

@brfrn169
Copy link
Collaborator Author

brfrn169 commented Jul 4, 2022

@feeblefakie Thank you for taking a look at this! I fixed it based on your review. Please take a look again when you have time!

@brfrn169 brfrn169 requested a review from feeblefakie July 4, 2022 05:06
Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

Thank you for the update!
Sorry, I left additional comments that I realized in the second look.

docs/api-guide.md Outdated Show resolved Hide resolved
docs/api-guide.md Outdated Show resolved Hide resolved
@brfrn169
Copy link
Collaborator Author

brfrn169 commented Jul 4, 2022

@feeblefakie Thank you for the suggestions! I fixed it based on your feedback. Please take a look again when you have time!

feeblefakie
feeblefakie previously approved these changes Jul 4, 2022
Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

Left minor suggestions, but LGTM! Thank you!

docs/api-guide.md Outdated Show resolved Hide resolved
docs/api-guide.md Outdated Show resolved Hide resolved
Co-authored-by: Hiroyuki Yamada <mogwaing@gmail.com>
@brfrn169 brfrn169 merged commit 8398aa7 into master Jul 4, 2022
@brfrn169 brfrn169 deleted the add-api-guide branch July 4, 2022 06:59
brfrn169 added a commit that referenced this pull request Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants