https://docs.oracle.com/ja-jp/iaas/nosql-database/doc/getting-started-oracle-nosql-database-cloud-service.html
https://www.oracle.com/jp/database/nosql/pricing/#provisioned-capacity-pricing
Oracle NoSQL Database Cloud Serviceでは、
オンデマンド・キャパシティとプロビジョニング・キャパシティ
の2つのキャパシティ価格モードが用意されています。
-- 表
oci nosql table list \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000
oci nosql table create \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--name nosqltab1 \
--ddl-statement '
CREATE TABLE nosqltab1 (
col1 integer
, col2 string
, col3 string
, PRIMARY KEY ( col1 )
) USING TTL 1 DAYS
' \
--table-limits '{
"capacity-mode": "PROVISIONED",
"max-read-units": 1,
"max-storage-in-g-bs": 1,
"max-write-units": 1
}'
oci nosql table delete \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--table-name-or-id nosqltab1 \
--force
-- インデックス
oci nosql index list \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--table-name-or-id "nosqltab1"
oci nosql index create \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--table-name-or-id nosqltab1 \
--index-name nosqlind1 \
--keys '[
{
"column-name": "col1",
"json-field-type": null,
"json-path": null
},
{
"column-name": "col2",
"json-field-type": null,
"json-path": null
}
]'
oci nosql index delete \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--table-name-or-id nosqltab1 \
--index-name nosqlind1 \
--force
-- データアップロード
oci nosql row update --generate-full-command-json-input
oci nosql row update \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--table-name-or-id nosqltab1 \
--value '{ "col1": 101, "col2": "AAA" }' \
--force
oci nosql row update \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--table-name-or-id nosqltab1 \
--value '{ "col1": 102, "col2": "BBB" }' \
--force
-- クエリ
oci nosql query prepare \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--statement '
SELECT col1,col2,col3 FROM nosqltab1
' \
--is-get-query-plan true
oci nosql query execute \
--compartment-id ocid1.compartment.oc1..000000000000000000000000000000000000000000000000000000000000 \
--statement '
SELECT col1,col2,col3 FROM nosqltab1
' \
--consistency "EVENTUAL"