| … | … | @@ -571,6 +571,23 @@ void RocksStorage::getKeysMonospace(AtomSpace* as, |
| 571 | 571 | } |
| 572 | 572 | if (as) key = as->add_atom(key); |
| 573 | 573 | |
| 574 | // Check for flag marker predicates and restore the flags. |
| 575 | // The mark will set the value automatically. |
| 576 | if (key->is_type(PREDICATE_NODE)) |
| 577 | { |
| 578 | const std::string& kname = key->get_name(); |
| 579 | if (kname == "*-IsKeyFlag-*") |
| 580 | { |
| 581 | markAtomIsKey(h); |
| 582 | continue; |
| 583 | } |
| 584 | if (kname == "*-IsMessageFlag-*") |
| 585 | { |
| 586 | markAtomIsMessage(h); |
| 587 | continue; |
| 588 | } |
| 589 | } |
| 590 | |
| 574 | 591 | // read-only Atomspaces will refuse insertion of keys. |
| 575 | 592 | // However, we have to special-case the truth values. |
| 576 | 593 | // Mostly because (PredicateNode "*-TruthValueKey-*") |
| … | … | @@ -651,6 +668,23 @@ void RocksStorage::getKeysMulti(AtomSpace* as, |
| 651 | 668 | Handle key = getAtom(rks.substr(kidoff)); |
| 652 | 669 | key = as->add_atom(key); |
| 653 | 670 | |
| 671 | // Check for flag marker predicates and restore the flags. |
| 672 | // The mark will set the value automatically. |
| 673 | if (key->is_type(PREDICATE_NODE)) |
| 674 | { |
| 675 | const std::string& kname = key->get_name(); |
| 676 | if (kname == "*-IsKeyFlag-*") |
| 677 | { |
| 678 | markAtomIsKey(h); |
| 679 | continue; |
| 680 | } |
| 681 | if (kname == "*-IsMessageFlag-*") |
| 682 | { |
| 683 | markAtomIsMessage(h); |
| 684 | continue; |
| 685 | } |
| 686 | } |
| 687 | |
| 654 | 688 | size_t junk = 0; |
| 655 | 689 | ValuePtr vp = Sexpr::decode_value(it->value().ToString(), junk); |
| 656 | 690 | if (vp) vp = as->add_atoms(vp); |