Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion docs/coverage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ code does not implement. Machine-readable: [`coverage.json`](./coverage.json).
| `cosmospostgresql` | — | [CosmosPostgreSQL](./azure/cosmospostgresql.md) | — | — | 34 |
| `costexplorer` | [CostExplorer](./aws/costexplorer.md) | — | — | — | 4 |
| `costmanagement` | — | [Costmanagement](./azure/costmanagement.md) | — | — | 1 |
| `database` | [DynamoDB](./aws/dynamodb.md) | [CosmosDB](./azure/cosmosdb.md) | [Firestore](./gcp/firestore.md) | | 24 |
| `database` | [DynamoDB](./aws/dynamodb.md) | [CosmosDB](./azure/cosmosdb.md) | [Firestore](./gcp/firestore.md) | [NoSQL](./oci/nosql.md) | 24 |
| `databricks` | — | [Databricks](./azure/databricks.md) | — | — | 46 |
| `datacatalog` | — | — | [DataCatalog](./gcp/datacatalog.md) | — | 21 |
| `datafactory` | — | [DataFactory](./azure/datafactory.md) | — | — | 6 |
Expand Down
3 changes: 2 additions & 1 deletion docs/coverage/coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4700,7 +4700,8 @@
"providers": {
"aws": "DynamoDB",
"azure": "CosmosDB",
"gcp": "Firestore"
"gcp": "Firestore",
"oci": "NoSQL"
}
},
{
Expand Down
1 change: 1 addition & 0 deletions docs/coverage/oci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Services cloudemu emulates for OCI, by native name. Back to the [cross-provider
| --- | --- | --- |
| [Identity](./identity.md) | `iam` | 40 |
| [Monitoring](./monitoring.md) | `monitoring` | 12 |
| [NoSQL](./nosql.md) | `database` | 24 |
| [VCN](./vcn.md) | `networking` | 57 |
| [Workrequest](./workrequest.md) | — (provider-native) | 4 |
37 changes: 37 additions & 0 deletions docs/coverage/oci/nosql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- Generated by `go generate ./...` (internal/coveragegen). Do not edit by hand. -->
# NoSQL

OCI's `database` service · portable interface `driver.Database` · [OCI index](./README.md)

## Operations (24)

| Operation | Description |
| --- | --- |
| `BatchGetItems` | |
| `BatchPutItems` | |
| `CreateIndex` | Global Secondary Indexes |
| `CreateTable` | |
| `DeleteIndex` | |
| `DeleteItem` | |
| `DeleteTable` | |
| `DescribeIndex` | |
| `DescribeTTL` | |
| `DescribeTable` | |
| `GetItem` | |
| `GetStreamRecords` | |
| `ListIndexes` | |
| `ListTables` | |
| `ListTagsOfResource` | |
| `PutItem` | |
| `Query` | |
| `Scan` | |
| `TagResource` | Tagging |
| `TransactWriteItems` | Transactional writes |
| `UntagResource` | |
| `UpdateItem` | |
| `UpdateStreamConfig` | Streams / Change Feed |
| `UpdateTTL` | TTL |

## Not in scope

_Not documented yet. See the [emulator boundary](../../../README.md) for cloudemu-wide non-goals._
61 changes: 60 additions & 1 deletion docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ client.DescribeInstances(ctx, &ec2.DescribeInstancesInput{IncludeManagedResource
## 3. Database

**Driver interface:** `services/database/driver/driver.go`
**AWS:** DynamoDB | **Azure:** Cosmos DB | **GCP:** Firestore
**AWS:** DynamoDB | **Azure:** Cosmos DB | **GCP:** Firestore | **OCI:** NoSQL Database

### Table Operations

Expand Down Expand Up @@ -343,6 +343,65 @@ client.DescribeInstances(ctx, &ec2.DescribeInstancesInput{IncludeManagedResource

**Total: 21 operations**

### OCI NoSQL Database

**Optional capability:** `server/oci/nosql.Extras` — OCI creates a table from a
DDL statement rather than a key list, gives it an OCID, a compartment and
capacity limits, and addresses rows by typed primary key columns, none of which
the portable model carries. Its value types live in `providers/oci/nosql`.
**Provider:** `providers/oci/nosql` | **Wire:** `server/oci/nosql`

| Operation | Route |
|-----------|-------|
| `CreateTable` | `POST /20190828/tables` |
| `ListTables` | `GET /20190828/tables` |
| `GetTable` | `GET /20190828/tables/{tableNameOrId}` |
| `UpdateTable` | `PUT /20190828/tables/{tableNameOrId}` |
| `DeleteTable` | `DELETE /20190828/tables/{tableNameOrId}` |
| `ChangeTableCompartment` | `POST /20190828/tables/{tableNameOrId}/actions/changeCompartment` |
| `CreateIndex` | `POST /20190828/tables/{tableNameOrId}/indexes` |
| `ListIndexes` | `GET /20190828/tables/{tableNameOrId}/indexes` |
| `GetIndex` | `GET /20190828/tables/{tableNameOrId}/indexes/{indexName}` |
| `DeleteIndex` | `DELETE /20190828/tables/{tableNameOrId}/indexes/{indexName}` |
| `GetRow` | `GET /20190828/tables/{tableNameOrId}/rows` |
| `UpdateRow` | `PUT /20190828/tables/{tableNameOrId}/rows` |
| `DeleteRow` | `DELETE /20190828/tables/{tableNameOrId}/rows` |
| `Query` | `POST /20190828/query` |

A table is addressed by name or OCID. Both list routes require `compartmentId`
and paginate with `limit` / `page`, returning the cursor as `opc-next-page`;
real OCI marks it optional on `ListIndexes`, and CloudEmu requires it so every
list is compartment-scoped. Table and index mutations are asynchronous in real
OCI, so they answer `202` with an `opc-work-request-id`; row writes are
synchronous and answer `200`.

The DDL is parsed, not stored and ignored. `CreateTable` reads `CREATE TABLE`
and `UpdateTable` reads `ALTER TABLE` — scalar and `JSON` column types, `NOT
NULL`, `DEFAULT`, `PRIMARY KEY` with an optional `SHARD`, `USING TTL <n> DAYS`,
and `ADD` / `DROP` on a non-key column. Everything else is refused with the
construct named: primary keys of more than two columns and composite shard
keys, which the portable partition/sort key pair cannot identify a row by;
`ARRAY`, `MAP`, `RECORD` and `ENUM` columns; generated, `MR_COUNTER` and
`UUID` modifiers; `USING TTL` in `HOURS`, which OCI's own `Schema` model
reports only in days; `MODIFY` and schema freezing; and JSON-path index keys.

`Query` runs `SELECT *` and `DELETE FROM` over one table with AND-ed equality
conditions — the REST API has no `MultiDelete`, so `DELETE FROM … WHERE` is how
several rows go at once. Column projections, aggregates, joins, `ORDER BY` and
range conditions are rejected rather than silently reinterpreted.

`/tables/{id}/usage` answers `501`: CloudEmu does not meter read, write and
storage consumption, so a row of zeros would read as real telemetry. So do
`/query/prepare` and `/query/summarize`, which hand back a prepared-statement
handle there is nothing to bind. **OCI NoSQL publishes no change stream** — it
has no DynamoDB-Streams or Cosmos-change-feed equivalent — so
`UpdateStreamConfig` and `GetStreamRecords` report `Unimplemented` rather than
returning an empty iterator that would read as "no changes yet".

Tables report `ACTIVE` from creation: every CloudEmu mutation is synchronous,
so the `CREATING` and `DELETING` states an SDK waiter may poll for are never
observable.

---

## 4. Serverless
Expand Down
Loading
Loading