MCPcopy Create free account
hub / github.com/baidu/tera / GetRawKeyOperatorFromSchema

Function GetRawKeyOperatorFromSchema

src/io/io_utils.cc:34–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34const leveldb::RawKeyOperator* GetRawKeyOperatorFromSchema(TableSchema& schema) {
35 // key_translator should be lg property, but here only support table
36 // property. In future work, key_translator should be done in leveldb.
37 RawKey raw_key = schema.raw_key();
38 switch (raw_key) {
39 case Binary:
40 return leveldb::BinaryRawKeyOperator();
41 case Readable:
42 return leveldb::ReadableRawKeyOperator();
43 default:
44 return leveldb::KvRawKeyOperator();
45 }
46}
47} // namespace tera

Callers 6

KvCompactStrategyMethod · 0.85
LoadMethod · 0.85
BuildLightFileMetaMethod · 0.85
BuildInternalKeyMethod · 0.85
GetInternalKeyStrMethod · 0.85

Calls 4

BinaryRawKeyOperatorFunction · 0.85
ReadableRawKeyOperatorFunction · 0.85
KvRawKeyOperatorFunction · 0.85
raw_keyMethod · 0.80

Tested by 3

BuildLightFileMetaMethod · 0.68
BuildInternalKeyMethod · 0.68
GetInternalKeyStrMethod · 0.68