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
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 API guide based on the feedback
  • Loading branch information
brfrn169 committed Jun 29, 2022
commit 7e3a32eff8c7133202589ca9132855d662186cd6
16 changes: 8 additions & 8 deletions docs/api-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ admin.createTable("ns", "tbl", tableMetadata, options);
you can create a secondary index as follows:

```java
// Create a secondary index on a column "c5" of a table "ns.tbl"
// Create a secondary index on a column "c5" of a table "ns.tbl". It will throw an exception if the secondary index already exists
admin.createIndex("ns", "tbl", "c5");

// Create a secondary index if not exists
// Create a secondary index only if it does not already exist
boolean ifNotExists = true;
admin.createIndex("ns", "tbl", "c5", ifNotExists);

Expand All @@ -139,10 +139,10 @@ admin.truncateTable("ns", "tbl");
you can drop a secondary index as follows:

```java
// Drop a secondary index on a column "c5" of a table "ns.tbl"
// Drop a secondary index on a column "c5" of a table "ns.tbl". It will throw an exception if the secondary index does not exist
admin.dropIndex("ns", "tbl", "c5");

// Drop a secondary index if exists
// Drop a secondary index only if it exists
boolean ifExists = true;
admin.dropIndex("ns", "tbl", "c5", ifExists);
```
Expand All @@ -152,10 +152,10 @@ admin.dropIndex("ns", "tbl", "c5", ifExists);
you can drop a table as follows:

```java
// Drop a table "ns.tbl"
// Drop a table "ns.tbl". It will throw an exception if the table does not exist
admin.dropTable("ns", "tbl");

// Drop a table if exists
// Drop a table if exists only if it exists
brfrn169 marked this conversation as resolved.
Show resolved Hide resolved
boolean ifExists = true;
admin.dropTable("ns", "tbl", ifExists);
```
Expand All @@ -165,10 +165,10 @@ admin.dropTable("ns", "tbl", ifExists);
you can drop a namespace as follows:

```java
// Drop a namespace "ns"
// Drop a namespace "ns". It will throw an exception if the namespace does not exist
admin.dropNamespace("ns");

// Drop a namespace if exists
// Drop a namespace only if it exists
boolean ifExists = true;
admin.dropNamespace("ns", ifExists);
```
Expand Down