-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathix_hashscan.h
53 lines (39 loc) · 1004 Bytes
/
ix_hashscan.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef IX_HASHSCAN_H
#define IX_HASHSCAN_H
#include "pf.h"
#include "rm_rid.h"
#include "ix_common.h"
#include "ix_hash.h"
class IX_HashScan
{
public:
IX_HashScan();
~IX_HashScan();
// Open index scan
RC OpenScan(IX_Hash * ipHash,
CompOp compOp,
void *value,
ClientHint pinHint = NO_HINT);
// Get the next matching entry return IX_EOF if no more matching
// entries.
RC GetNextEntry(RID &rid);
// Close index scan
RC CloseScan();
private:
template <typename T, int n>
RC OpenScan_t();
template <typename T, int n>
RC ScanBucket_t(const PageNum iPageNum);
template <typename T, int n>
RC GetNextEntry_t(RID &rid);
RC ReadBucket(PageNum iPageNum, RID &rid);
CompOp _compOp;
void * _value;
ClientHint _pinHint;
PageNum _nextBucketNum;
PageNum _nextRidBucketNum;
int _nextRidBucketSlot;
int _nextHash;
IX_Hash * _pHash;
};
#endif // IX_HASHSCAN_H