MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / SortMap

Class SortMap

src/jrd/recsrc/RecordSource.h:636–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634
635 // Sort map block
636 class SortMap : public Firebird::PermanentStorage
637 {
638 public:
639 struct Item
640 {
641 void reset(NestConst<ValueExprNode> _node, ULONG _flagOffset = 0)
642 {
643 desc.clear();
644 stream = fieldId = 0;
645 node = _node;
646 flagOffset = _flagOffset;
647 }
648
649 void reset(StreamType _stream, SSHORT _fieldId, ULONG _flagOffset = 0)
650 {
651 desc.clear();
652 node = nullptr;
653 stream = _stream;
654 fieldId = _fieldId;
655 flagOffset = _flagOffset;
656 }
657
658 StreamType stream; // stream for field id
659 dsc desc; // relative descriptor
660 ULONG flagOffset; // offset of missing flag
661 SSHORT fieldId; // id for field (or ID constants)
662 NestConst<ValueExprNode> node; // expression node
663 };
664
665 explicit SortMap(MemoryPool& p)
666 : PermanentStorage(p),
667 length(0),
668 keyLength(0),
669 flags(0),
670 keyItems(p),
671 items(p)
672 {
673 }
674
675 ULONG length; // sort record length
676 ULONG keyLength; // key length
677 USHORT flags; // misc sort flags
678 Firebird::Array<sort_key_def> keyItems; // address of key descriptors
679 Firebird::Array<Item> items;
680 };
681
682 SortedStream(CompilerScratch* csb, RecordSource* next, SortMap* map);
683

Callers 1

generateSortMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected