RocksDB · Example Payload

Rocksdb Get Example

Read a value by key from the default column family

RocksDBKey-Value StoreEmbedded DatabaseStorage EngineOpen Source

Rocksdb Get Example is an example object payload from RocksDB, with 6 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationdescriptionlanguagecode_snippetrequestresponse

Example Payload

rocksdb-get-example.json Raw ↑
{
  "operation": "Get",
  "description": "Read a value by key from the default column family",
  "language": "C++",
  "code_snippet": "std::string value;\nrocksdb::Status s = db->Get(rocksdb::ReadOptions(), key, &value);\nif (s.ok()) {\n  // value contains the result\n} else if (s.IsNotFound()) {\n  // key does not exist\n}",
  "request": {
    "key": "user:12345",
    "column_family": "default",
    "options": {
      "verify_checksums": true,
      "fill_cache": true
    }
  },
  "response": {
    "found": true,
    "value": "{\"name\": \"Alice\", \"email\": \"alice@example.com\"}",
    "status": "OK"
  }
}