Documentation
¶
Index ¶
- Constants
- func InsertBranchKCNode(node node, key int64, left, right node)
- func InsertKVLeafNode(node node, key int64, value int64)
- func NewBufferPoolManager(dir string) *bufferPoolManager
- type Backend
- type BitSet
- type Cell
- type Column
- type Condition
- type InsertColumn
- type LRU
- type Lexer
- type Operator
- type PageID
- type Query
- type QueryType
- type ResultColumn
- type Rows
- type Table
Constants ¶
View Source
const ( ORDER = 128 //order*2=256 which is how many fit in a PAGESIZE block 4096/16(16 = 2 int64) MAXAMT = ORDER*2 + 1 )
View Source
const ( COL_ISUNIQUE = 1 << 0 COL_ISNULL = 1 << 1 COL_ISPRIMARY = 1 << 2 )
View Source
const ( COL_I_PRIMARYNULL insertType = iota COL_I_PRIMARYVALUED COL_I_VALUED COL_I_NULL )
View Source
const ( PAGESIZE = 4096 MAXPOOLSIZE = 10 MAXINT64 = (1 << 63) - 1 )
View Source
const ( INT = iota + 1 FLOAT BOOL CHAR )
Variables ¶
This section is empty.
Functions ¶
func InsertBranchKCNode ¶
func InsertBranchKCNode(node node, key int64, left, right node)
func InsertKVLeafNode ¶
func NewBufferPoolManager ¶
func NewBufferPoolManager(dir string) *bufferPoolManager
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func CreateNewDatabase ¶
func OpenExistingDatabase ¶
func (*Backend) CreateTable ¶
type BitSet ¶
type BitSet struct {
// contains filtered or unexported fields
}
func InitializeBitSet ¶
type Cell ¶
type Cell []byte
Contain functions to convert byte slice to appropriate datatype as supported by database
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
ColumnType values are define in parser.go
Column values should always immutable after first creation TODO: change allocate buffer to not use columnoffset
type Condition ¶
type Condition struct { // Operand1 is the left hand side operand Operand1 string // Operand1IsField determines if Operand1 is a literal or a field name Operand1IsField bool // Operator is e.g. "=", ">" Operator Operator // Operand1 is the right hand side operand Operand2 string // Operand2IsField determines if Operand2 is a literal or a field name Operand2IsField bool }
Condition is a single boolean condition in a WHERE clause
type InsertColumn ¶
type InsertColumn struct {
// contains filtered or unexported fields
}
type LRU ¶
type LRU struct {
// contains filtered or unexported fields
}
func InitialLRU ¶
func InitialLRU() LRU
type Query ¶
type QueryType ¶
type QueryType int
const ( // UnknownType is the zero value for a queryType UnknownType QueryType = iota // Select represents a SELECT query Select // Update represents an UPDATE query Update // Insert represents an INSERT query Insert // Delete represents a DELETE query Delete // Create represents a CREATE query Create //Drop represents a DROP query Drop )
type ResultColumn ¶
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
Result from sql select statement in driver query Must use pointer for interface to be properly implements and allow pointer to struct Implements driver.Rows
type Table ¶
type Table struct { Columns []Column Name string //max size is maxuint8 // contains filtered or unexported fields }
TableName must be checked to be within 1 byte range ColumnNames must have length within 1 byte range Columns slice must preserve order
func (*Table) GenerateFields ¶
func (t *Table) GenerateFields()
func (*Table) GenerateRowBytes ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.