Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MIT-DB-Class/simple-db-hw
/ functions
Functions
1,070 in github.com/MIT-DB-Class/simple-db-hw
⨍
Functions
1,070
◇
Types & classes
161
↓ 132 callers
Method
getBufferPool
Return the buffer pool of the static Database instance
src/java/simpledb/Database.java:44
↓ 131 callers
Method
next
Returns the next tuple from the operator (typically implementing by reading from a child operator or an access method). @return the next tuple in the
src/java/simpledb/OpIterator.java:35
↓ 111 callers
Method
getCatalog
Return the catalog of the static Database instance
src/java/simpledb/Database.java:49
↓ 100 callers
Method
getTableId
@return the unique tableid hashcode with this PageId
src/java/simpledb/PageId.java:15
↓ 99 callers
Method
getId
Return the id of this page. The id is a unique identifier for a page that can be used to look up the page on disk or determine if the page is residen
src/java/simpledb/Page.java:22
↓ 97 callers
Method
equals
(Object field)
src/java/simpledb/Field.java:37
↓ 70 callers
Method
hasNext
Returns true if the iterator has more tuples. @return true f the iterator has more tuples. @throws IllegalStateException If the iterator has not been
src/java/simpledb/OpIterator.java:25
↓ 64 callers
Method
getPage
Retrieve the specified page with the associated permissions. Will acquire a lock and may block if that lock is held by another transaction. <p> The re
src/java/simpledb/BufferPool.java:67
↓ 63 callers
Method
getHeapTuple
@return a Tuple with a single IntField with value n and with RecordId(HeapPageId(1,2), 3)
src/java/simpledb/Utility.java:49
↓ 61 callers
Method
getField
@return the value of the ith field, or null if it has not been set. @param i field index to return. Must be a valid index.
src/java/simpledb/Tuple.java:72
↓ 55 callers
Method
look
(HeapFile hf, Transaction t, int v1, boolean present)
test/simpledb/systemtest/LogTest.java:41
↓ 53 callers
Method
getKey
@return the key
src/java/simpledb/BTreeEntry.java:59
↓ 51 callers
Method
getTupleDesc
@return a TupleDesc with n fields of type Type.INT_TYPE, each named name + n (name1, name2, etc.).
src/java/simpledb/Utility.java:34
↓ 51 callers
Method
next
Gets the next tuple from the operator (typically implementing by reading from a child operator or an access method). @return The next tuple in the it
src/java/simpledb/DbFileIterator.java:27
↓ 50 callers
Method
getPageNumber
()
src/java/simpledb/PageId.java:34
↓ 49 callers
Method
getValue
()
src/java/simpledb/IntField.java:14
↓ 46 callers
Method
transactionComplete
Release all locks associated with a given transaction. @param tid the ID of the transaction requesting the unlock
src/java/simpledb/BufferPool.java:92
↓ 44 callers
Method
addTable
Set up initial resources for each unit test.
test/simpledb/HeapPageReadTest.java:70
↓ 43 callers
Method
hasNext
@return true if there are more tuples available, false if no more tuples or iterator isn't open.
src/java/simpledb/DbFileIterator.java:17
↓ 43 callers
Method
open
Opens the iterator @throws DbException when there are problems opening/accessing the database.
src/java/simpledb/DbFileIterator.java:13
↓ 40 callers
Method
getTupleDesc
Returns the TupleDesc of the table stored in this DbFile. @return TupleDesc of this DbFile.
src/java/simpledb/DbFile.java:90
↓ 38 callers
Method
close
Closes the iterator. When the iterator is closed, calling next(), hasNext(), or rewind() should fail by throwing IllegalStateException.
src/java/simpledb/OpIterator.java:54
↓ 38 callers
Method
compare
Compare the value of this field object to the passed in value. @param op The operator @param value The value to compare this Field to @return Whether
src/java/simpledb/Field.java:23
↓ 38 callers
Method
iterator
@return an iterator over all entries on this page (calling remove on this iterator throws an UnsupportedOperationException) (note that this iterator s
src/java/simpledb/BTreeInternalPage.java:608
↓ 37 callers
Method
getPageSize
()
src/java/simpledb/BufferPool.java:38
↓ 36 callers
Method
close
Closes the iterator.
src/java/simpledb/DbFileIterator.java:39
↓ 36 callers
Method
getId
Returns an ID uniquely identifying this HeapFile. Implementation note: you will need to generate this tableid somewhere to ensure that each HeapFile h
src/java/simpledb/HeapFile.java:48
↓ 36 callers
Method
pgcateg
@return the category of this page
src/java/simpledb/BTreePageId.java:62
↓ 35 callers
Method
getLeftChild
@return the left child page id
src/java/simpledb/BTreeEntry.java:66
↓ 35 callers
Method
getNumEntries
Returns the number of entries (keys) currently stored on this page
src/java/simpledb/BTreeInternalPage.java:564
↓ 35 callers
Method
open
Opens the iterator. This must be called before any of the other methods. @throws DbException when there are problems opening/accessing the database.
src/java/simpledb/OpIterator.java:18
↓ 34 callers
Method
getId
Returns an ID uniquely identifying this BTreeFile. Implementation note: you will need to generate this tableid somewhere and ensure that each BTreeFil
src/java/simpledb/BTreeFile.java:59
↓ 31 callers
Method
createRandomHeapFile
@param columnSpecification Mapping between column index and value.
test/simpledb/systemtest/SystemTestUtil.java:22
↓ 31 callers
Method
setField
Change the value of the ith field of this tuple. @param i index of the field to change. It must be a valid index. @param f new
src/java/simpledb/Tuple.java:62
↓ 30 callers
Method
getRightChild
@return the right child page id
src/java/simpledb/BTreeEntry.java:73
↓ 30 callers
Method
iterator
Returns an iterator over all the tuples stored in this DbFile. The iterator must use {@link BufferPool#getPage}, rather than {@link #readPage} to iter
src/java/simpledb/DbFile.java:69
↓ 29 callers
Method
getField
@return an IntField with value n
test/simpledb/TestUtil.java:12
↓ 29 callers
Method
hashCode
Hash code. Different Field objects representing the same value should probably return the same hashCode.
src/java/simpledb/Field.java:36
↓ 28 callers
Method
addValue
Add a value to the set of values that you are keeping a histogram of. @param v Value to add to the histogram
src/java/simpledb/IntHistogram.java:31
↓ 28 callers
Method
estimateSelectivity
Estimate the selectivity of predicate <tt>field op constant</tt> on the table. @param field The field over which the predicate ranges @par
src/java/simpledb/TableStats.java:149
↓ 28 callers
Method
getNumEmptySlots
Returns the number of empty slots on this page.
src/java/simpledb/BTreeInternalPage.java:571
↓ 27 callers
Method
getNumTuples
Returns the number of tuples currently stored on this page
src/java/simpledb/BTreeLeafPage.java:440
↓ 26 callers
Method
estimateSelectivity
Estimate the selectivity of a particular predicate and operand on this table. For example, if "op" is "GREATER_THAN" and "v" is 5, return your estima
src/java/simpledb/IntHistogram.java:45
↓ 26 callers
Method
getPage
Method to encapsulate the process of locking/fetching a page. First the method checks the local cache ("dirtypages"), and if it can't find the reques
src/java/simpledb/BTreeFile.java:412
↓ 26 callers
Method
start
Start the transaction running
src/java/simpledb/Transaction.java:19
↓ 25 callers
Method
toString
()
src/java/simpledb/Field.java:39
↓ 24 callers
Method
log
Log message if the log level >= level. Uses printf.
src/java/simpledb/Debug.java:33
↓ 24 callers
Method
resetBufferPool
Method used for testing -- create a new instance of the buffer pool and return it
src/java/simpledb/Database.java:57
↓ 24 callers
Method
startGrabber
Helper method to clean up the syntax of starting a LockGrabber thread. The parameters pass through to the LockGrabber constructor.
test/simpledb/DeadlockTest.java:62
↓ 23 callers
Method
getFieldName
Gets the (possibly null) field name of the ith field of this TupleDesc. @param i index of the field name to return. It must be a valid ind
src/java/simpledb/TupleDesc.java:94
↓ 23 callers
Method
indexIterator
get the specified tuples from the file based on its IndexPredicate value on behalf of the specified transaction. This method will acquire a read lock
src/java/simpledb/BTreeFile.java:1056
↓ 23 callers
Method
numFields
@return the number of fields in this TupleDesc
src/java/simpledb/TupleDesc.java:80
↓ 23 callers
Method
numPages
Returns the number of pages in this BTreeFile.
src/java/simpledb/BTreeFile.java:166
↓ 22 callers
Method
createDuplicateHeapFile
Given a matrix of tuples from SystemTestUtil.createRandomHeapFile, create an identical HeapFile table @param tuples Tuples to create a Hea
test/simpledb/JoinOptimizerTest.java:36
↓ 21 callers
Method
createRandomBTreeFile
@param columnSpecification Mapping between column index and value.
src/java/simpledb/BTreeUtility.java:115
↓ 21 callers
Method
createTupleList
@return a OpIterator over a list of tuples constructed over the data provided in the constructor. This iterator is already open. @param width the nu
test/simpledb/TestUtil.java:26
↓ 21 callers
Method
getFieldType
Gets the type of the ith field of this TupleDesc. @param i The index of the field to get the type of. It must be a valid index.
src/java/simpledb/TupleDesc.java:109
↓ 21 callers
Method
getRootId
Get the id of the root page in this B+ tree @return the id of the root page
src/java/simpledb/BTreeRootPtrPage.java:158
↓ 20 callers
Method
estimateTableCardinality
This method returns the number of tuples in the relation, given that a predicate with selectivity selectivityFactor is applied. @param selectivityFac
src/java/simpledb/TableStats.java:116
↓ 20 callers
Method
getNumEmptySlots
Returns the number of empty slots on this page.
src/java/simpledb/BTreeLeafPage.java:447
↓ 20 callers
Method
setRecordId
Set the RecordId information for this tuple. @param rid the new RecordId for this tuple.
src/java/simpledb/Tuple.java:50
↓ 19 callers
Method
acquired
@return true if we successfully acquired the specified lock
test/simpledb/TestUtil.java:357
↓ 19 callers
Method
getId
@return the PageId associated with this page.
src/java/simpledb/BTreeRootPtrPage.java:57
↓ 19 callers
Method
insertRow
(HeapFile hf, Transaction t, int v1, int v2)
test/simpledb/systemtest/LogTest.java:21
↓ 19 callers
Method
isSlotUsed
Returns true if associated slot on this page is filled.
src/java/simpledb/BTreeInternalPage.java:584
↓ 19 callers
Method
reset
()
src/java/simpledb/Database.java:77
↓ 18 callers
Method
commit
Finish the transaction
src/java/simpledb/Transaction.java:33
↓ 18 callers
Method
deleteTuple
Removes the specified tuple from the file on behalf of the specified transaction. This method will acquire a lock on the affected pages of the file, a
src/java/simpledb/DbFile.java:59
↓ 18 callers
Method
fieldNameToIndex
Find the index of the field with a given name. @param name name of the field. @return the index of the field that is first to have the giv
src/java/simpledb/TupleDesc.java:123
↓ 18 callers
Method
flushAllPages
Flush all dirty pages to disk. NB: Be careful using this routine -- it writes dirty data to disk so will break simpledb if running in NO STEAL mod
src/java/simpledb/BufferPool.java:162
↓ 18 callers
Method
getBTreeTuple
@return a Tuple with a single IntField with value n and with RecordId(BTreePageId(1,2, BTreePageId.LEAF), 3)
src/java/simpledb/BTreeUtility.java:35
↓ 18 callers
Method
getLen
()
src/java/simpledb/Type.java:13
↓ 17 callers
Method
getTableName
(int id)
src/java/simpledb/Catalog.java:98
↓ 17 callers
Method
insertTuple
Inserts the specified tuple to the file on behalf of transaction. This method will acquire a lock on the affected pages of the file, and may block unt
src/java/simpledb/DbFile.java:43
↓ 16 callers
Method
checkRep
checks the integrity of the tree: 1) parent pointers. 2) sibling pointers. 3) range invariants. 4) record to page pointers. 5) occupancy invariants. (
src/java/simpledb/BTreeChecker.java:59
↓ 16 callers
Method
getKey
protected method used by the iterator to get the ith key out of this page @param i - the index of the key @return the ith key @throws NoSuchElementExc
src/java/simpledb/BTreeInternalPage.java:626
↓ 16 callers
Method
iterator
@return an iterator over all tuples on this page (calling remove on this iterator throws an UnsupportedOperationException) (note that this iterator sh
src/java/simpledb/BTreeLeafPage.java:482
↓ 15 callers
Method
filter
Compares the field number of t specified in the constructor to the operand field specified in the constructor using the operator specific in the const
src/java/simpledb/Predicate.java:98
↓ 15 callers
Method
filter
Apply the predicate to the two specified tuples. The comparison can be made through Field's compare method. @return true if the tuples satisfy the pr
src/java/simpledb/JoinPredicate.java:37
↓ 15 callers
Method
getEstimatedCardinality
@return The estimated cardinality of this operator. Will only be used in lab7
src/java/simpledb/Operator.java:94
↓ 15 callers
Method
getRecordId
@return The RecordId representing the location of this tuple on disk. May be null.
src/java/simpledb/Tuple.java:39
↓ 15 callers
Method
setParentId
Unit test for BTreeLeafPage.setParentId()
test/simpledb/BTreeLeafPageTest.java:110
↓ 14 callers
Method
createEmptyPageData
Static method to generate a byte array corresponding to an empty HeapPage. Used to add new, empty pages to the file. Passing the results of this metho
src/java/simpledb/HeapPage.java:233
↓ 14 callers
Method
doInsert
(HeapFile hf, int t1, int t2)
test/simpledb/systemtest/LogTest.java:62
↓ 14 callers
Method
getNumEmptySlots
Returns the number of empty slots on this page.
src/java/simpledb/HeapPage.java:283
↓ 14 callers
Method
getUUID
Generates a unique string each time it is called. @return a new unique UUID as a string, using java.util.UUID
test/simpledb/systemtest/SystemTestUtil.java:173
↓ 14 callers
Method
matchAllTuples
Check to see if every tuple in expected matches <b>some</b> tuple in actual via compareTuples. Note that actual may be a superset. If not, throw an
test/simpledb/TestUtil.java:128
↓ 13 callers
Method
equals
Compares one PageId to another. @param o The object to compare against (must be a PageId) @return true if the objects are equal (e.g., page numbers,
src/java/simpledb/BTreePageId.java:84
↓ 13 callers
Method
getTupleNumber
@return the tuple number this RecordId references.
src/java/simpledb/RecordId.java:29
↓ 13 callers
Method
isSlotUsed
Returns true if associated slot on this page is filled.
src/java/simpledb/BTreeLeafPage.java:458
↓ 13 callers
Method
markDirty
Set the dirty state of this page as dirtied by a particular transaction
src/java/simpledb/Page.java:34
↓ 13 callers
Method
matchTuples
(DbFile f, List<ArrayList<Integer>> tuples)
test/simpledb/systemtest/SystemTestUtil.java:97
↓ 12 callers
Method
clear
Delete all tables from the catalog
src/java/simpledb/Catalog.java:104
↓ 12 callers
Method
openHeapFile
Opens a HeapFile and adds it to the catalog. @param cols number of columns in the table. @param f location of the file storing the table. @return the
src/java/simpledb/Utility.java:132
↓ 12 callers
Method
start
()
src/java/simpledb/Query.java:53
↓ 12 callers
Method
tupleToList
(Tuple tuple)
test/simpledb/systemtest/SystemTestUtil.java:88
↓ 11 callers
Method
createEmptyBTreeFile
A utility method to create a new BTreeFile with no data, assuming the path does not already exist. If the path exists, the file will be overwritten. T
src/java/simpledb/BTreeUtility.java:446
↓ 11 callers
Method
getRightSiblingId
Get the id of the right sibling of this page @return the id of the right sibling
src/java/simpledb/BTreeLeafPage.java:390
↓ 11 callers
Method
getSize
@return The size (in bytes) of tuples corresponding to this TupleDesc. Note that tuples from a given TupleDesc are of a fixed size.
src/java/simpledb/TupleDesc.java:132
↓ 11 callers
Method
iterator
Get an iterator for all tuples in this B+ tree file in sorted order. This method will acquire a read lock on the affected pages of the file, and may b
src/java/simpledb/BTreeFile.java:1068
next →
1–100 of 1,070, ranked by callers