Closed AlexanderMihail closed 3 months ago
The newest signatures for Table::get and Table::set are:
https://github.com/AlexanderMihail/seastar_db/blob/4df6de30988b197b107c4857186da4c7276a4994/demos/db_demo.cc#L457 https://github.com/AlexanderMihail/seastar_db/blob/4df6de30988b197b107c4857186da4c7276a4994/demos/db_demo.cc#L568
The empty string is now an accepted value. Table::set prevents multiple insertions and also updating a key that doesn't exist. Table::get returns a pair of bool and cache iterator. The retrieved value is in the string&value parameter. The second return value is the iterator to the corresponding cache line. Table::set first does a get, then uses the iterator get returns.
Relates to #6.
Table::set should return false if the key is already present, rather than update the value. Table::get should return false if the key is not present, rather than return "" which should be a legal value.