A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Database.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* *
3
* Copyright 2018 Rice University *
4
* *
5
* Licensed under the Apache License, Version 2.0 (the "License"); *
6
* you may not use this file except in compliance with the License. *
7
* You may obtain a copy of the License at *
8
* *
9
* http://www.apache.org/licenses/LICENSE-2.0 *
10
* *
11
* Unless required by applicable law or agreed to in writing, software *
12
* distributed under the License is distributed on an "AS IS" BASIS, *
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14
* See the License for the specific language governing permissions and *
15
* limitations under the License. *
16
* *
17
*****************************************************************************/
18
19
#ifndef DATABASE_H
20
#define DATABASE_H
21
22
#include "
PDBObject.h
"
23
#include "
UserType.h
"
24
#include "
PDBPage.h
"
25
#include "
DataTypes.h
"
26
27
#include <vector>
28
using namespace
std;
29
34
class
DatabaseInterface
{
35
public
:
36
/*
37
* To support polymorphism.
38
*/
39
virtual
~DatabaseInterface
() {}
40
44
virtual
void
addType(
TypePtr
type) = 0;
45
50
virtual
bool
removeType(
UserTypeID
typeID) = 0;
51
55
virtual
void
dump() = 0;
56
60
virtual
DatabaseID
getDatabaseID() = 0;
61
65
virtual
string
getDatabaseName() = 0;
66
74
virtual
bool
addObject(
PDBObjectPtr
object
,
PageID
& pageId, MiniPageID& miniPageId) = 0;
75
79
virtual
PDBObjectPtr
getObject(
UserTypeID
typeID,
80
SetID
setID,
81
PageID
pageID,
82
MiniPageID miniPageID) = 0;
83
87
virtual
PDBObjectPtr
getObjectByOffset(
UserTypeID
typeID,
88
SetID
setID,
89
PageID
pageID,
90
size_t
offset) = 0;
91
95
virtual
PDBPagePtr
getPage(
UserTypeID
typeID,
SetID
setID,
PageID
pageID) = 0;
96
100
virtual
int
getNumPages(
UserTypeID
typeId,
SetID
setId) = 0;
101
105
virtual
TypePtr
getType(
UserTypeID
typeId) = 0;
106
110
virtual
void
flush() = 0;
111
};
112
113
114
#endif
/* DATABASE_H */
SetID
unsigned int SetID
Definition:
DataTypes.h:31
PDBPagePtr
shared_ptr< PDBPage > PDBPagePtr
Definition:
PDBPage.h:32
DatabaseInterface
Definition:
Database.h:34
TypePtr
shared_ptr< UserType > TypePtr
Definition:
UserType.h:41
UserType.h
DatabaseInterface::~DatabaseInterface
virtual ~DatabaseInterface()
Definition:
Database.h:39
PDBObject.h
DataTypes.h
DatabaseID
unsigned int DatabaseID
Definition:
DataTypes.h:29
PageID
unsigned int PageID
Definition:
DataTypes.h:26
PDBPage.h
PDBObjectPtr
shared_ptr< PDBObject > PDBObjectPtr
Definition:
PDBObject.h:27
UserTypeID
unsigned int UserTypeID
Definition:
DataTypes.h:25
plinycompute
pdb
src
storage
headers
Database.h
Generated on Mon Jun 18 2018 18:10:36 by
1.8.6