@@ -38,7 +38,7 @@ VERSION=$(grep SCALARDL_VERSION .env | awk -F= '{print $2}')
3838``` console
3939curl -OL https://github.com/scalar-labs/scalardl/releases/download/v$VERSION/scalardl-tablestore-java-client-sdk-$VERSION.zip
4040unzip scalardl-tablestore-java-client-sdk-$VERSION.zip
41- mv scalardl-tablestore-java-client-sdk-$VERSION client
41+ mv scalardl-tablestore-java-client-sdk-$VERSION tablestore
4242```
4343
4444## クライアントプロパティの設定
7474次に、以下のコマンドを実行して TableStore をブートストラップできます:
7575
7676``` console
77- client /bin/scalardl-tablestore bootstrap --properties client.properties
77+ tablestore /bin/scalardl-tablestore bootstrap --properties client.properties
7878```
7979
8080ブートストラップコマンドは、内部的にアイデンティティ情報 (証明書またはシークレット) と TableStore を使用するために必要な事前定義されたコントラクトを登録します。
@@ -94,11 +94,11 @@ client/bin/scalardl-tablestore bootstrap --properties client.properties
9494以下のコマンドを実行して、サンプルテーブルを作成できます:
9595
9696``` console
97- client /bin/scalardl-tablestore execute-statement --properties client.properties \
97+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
9898--statement "CREATE TABLE employee (id STRING PRIMARY KEY, department STRING)"
9999```
100100``` console
101- client /bin/scalardl-tablestore execute-statement --properties client.properties \
101+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
102102--statement "CREATE TABLE department (id STRING PRIMARY KEY)"
103103```
104104
@@ -107,7 +107,7 @@ client/bin/scalardl-tablestore execute-statement --properties client.properties
107107以下のコマンドを実行して、作成されたテーブルを表示できます:
108108
109109``` console
110- client /bin/scalardl-tablestore execute-statement --properties client.properties \
110+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
111111--statement "SELECT * FROM information_schema.tables"
112112```
113113
@@ -136,26 +136,26 @@ Result:
136136次に、以下のコマンドを実行して、複数の ` employee ` レコードを挿入します:
137137
138138``` console
139- client /bin/scalardl-tablestore execute-statement --properties client.properties \
139+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
140140--statement "INSERT INTO employee VALUES {'id': '1001', 'name': 'Alice', 'department': 'sales', 'salary': 654.3}"
141141```
142142``` console
143- client /bin/scalardl-tablestore execute-statement --properties client.properties \
143+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
144144--statement "INSERT INTO employee VALUES {'id': '1002', 'name': 'Bob', 'department': 'sales', 'salary': 543.2}"
145145```
146146``` console
147- client /bin/scalardl-tablestore execute-statement --properties client.properties \
147+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
148148--statement "INSERT INTO employee VALUES {'id': '1003', 'name': 'Carol', 'department': 'engineering', 'salary': 654.3}"
149149```
150150
151151また、以下のコマンドを実行して、対応する ` department ` レコードも挿入します:
152152
153153``` console
154- client /bin/scalardl-tablestore execute-statement --properties client.properties \
154+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
155155--statement "INSERT INTO department VALUES {'id': 'sales', 'location': 'Shinjuku', 'phone': '000-1234'}"
156156```
157157``` console
158- client /bin/scalardl-tablestore execute-statement --properties client.properties \
158+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
159159--statement "INSERT INTO department VALUES {'id': 'engineering', 'location': 'Shibuya', 'phone': '000-4321'}"
160160```
161161
@@ -164,7 +164,7 @@ client/bin/scalardl-tablestore execute-statement --properties client.properties
164164次に、挿入されたレコードを確認します。レコードを選択するには、少なくともプライマリキーまたはインデックスキーを指定する必要があります。例えば、以下のコマンドを実行して、プライマリキーを指定して ` employee ` レコードを取得できます:
165165
166166``` console
167- client /bin/scalardl-tablestore execute-statement --properties client.properties \
167+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
168168--statement "SELECT id, name, department FROM employee WHERE id = '1001'"
169169```
170170
@@ -182,7 +182,7 @@ Result:
182182以下のコマンドを実行して、インデックスキーを指定してレコードを選択することもできます:
183183
184184``` console
185- client /bin/scalardl-tablestore execute-statement --properties client.properties \
185+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
186186--statement "SELECT id, name, department FROM employee WHERE department = 'sales'"
187187```
188188
@@ -204,7 +204,7 @@ Result:
204204レコードをフィルタリングしたい場合は、以下のコマンドを実行して追加の条件を指定します:
205205
206206``` console
207- client /bin/scalardl-tablestore execute-statement --properties client.properties \
207+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
208208--statement "SELECT id, name, department FROM employee WHERE department = 'sales' AND salary < 600"
209209```
210210
@@ -223,7 +223,7 @@ Result:
223223以下のコマンドを実行して、2つのテーブルを結合することもできます:
224224
225225``` console
226- client /bin/scalardl-tablestore execute-statement --properties client.properties \
226+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
227227--statement "SELECT * FROM employee JOIN department ON employee.department = department.id WHERE employee.department = 'engineering'"
228228```
229229
@@ -247,7 +247,7 @@ Result:
247247以下のコマンドを実行して、` employee ` レコードを更新できます:
248248
249249``` console
250- client /bin/scalardl-tablestore execute-statement --properties client.properties \
250+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
251251--statement "UPDATE employee SET salary = 754.3 WHERE department = 'engineering'"
252252```
253253
@@ -258,7 +258,7 @@ client/bin/scalardl-tablestore execute-statement --properties client.properties
258258以下のコマンドを実行して、レコードの更新履歴を取得できます:
259259
260260``` console
261- client /bin/scalardl-tablestore execute-statement --properties client.properties \
261+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
262262--statement "SELECT history() FROM employee WHERE id = '1003'"
263263```
264264
@@ -288,7 +288,7 @@ Result:
288288バージョン数 (age) を制限したい場合は、以下のコマンドを実行して ` LIMIT ` 句を指定します:
289289
290290``` console
291- client /bin/scalardl-tablestore execute-statement --properties client.properties \
291+ tablestore /bin/scalardl-tablestore execute-statement --properties client.properties \
292292--statement "SELECT history() FROM employee WHERE id = '1003' LIMIT 1"
293293```
294294
@@ -314,7 +314,7 @@ ScalarDL では、すべてのデータが有効な状態にあることを確
314314以下のコマンドを実行して、テーブルスキーマを検証できます:
315315
316316``` console
317- client /bin/scalardl-tablestore validate-ledger --properties client.properties \
317+ tablestore /bin/scalardl-tablestore validate-ledger --properties client.properties \
318318--table-name employee
319319```
320320
@@ -337,7 +337,7 @@ client/bin/scalardl-tablestore validate-ledger --properties client.properties \
337337以下のコマンドを実行して、レコードを検証できます:
338338
339339``` console
340- client /bin/scalardl-tablestore validate-ledger --properties client.properties \
340+ tablestore /bin/scalardl-tablestore validate-ledger --properties client.properties \
341341--table-name employee --primary-key-column-name id --column-value '"1001"'
342342```
343343
@@ -366,7 +366,7 @@ client/bin/scalardl-tablestore validate-ledger --properties client.properties \
366366以下のコマンドを実行して、インデックスレコードを検証できます:
367367
368368``` console
369- client /bin/scalardl-tablestore validate-ledger --properties client.properties \
369+ tablestore /bin/scalardl-tablestore validate-ledger --properties client.properties \
370370--table-name employee --index-key-column-name department --column-value '"sales"'
371371```
372372
0 commit comments