db_operation.proto 704 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
  2. // This source code is licensed under both the GPLv2 (found in the
  3. // COPYING file in the root directory) and Apache 2.0 License
  4. // (found in the LICENSE.Apache file in the root directory).
  5. // Defines database operations.
  6. // Each operation is a key-value pair and an operation type.
  7. syntax = "proto2";
  8. enum OpType {
  9. PUT = 0;
  10. MERGE = 1;
  11. DELETE = 2;
  12. DELETE_RANGE = 3;
  13. }
  14. message DBOperation {
  15. required string key = 1;
  16. // value is ignored for DELETE.
  17. // [key, value] is the range for DELETE_RANGE.
  18. optional string value = 2;
  19. required OpType type = 3;
  20. }
  21. message DBOperations {
  22. repeated DBOperation operations = 1;
  23. }