Documentation
¶
Index ¶
- func CleanupLockTable(t testing.TB)
- type CheckpointLogRecord
- type CommitLogRecord
- type LogRecord
- type LogRecordType
- type RollbackLogRecord
- type SetInt32LogRecord
- type SetStrLogRecord
- type StartLogRecord
- type Transaction
- func (t *Transaction) Append(filename string) (file.BlockID, error)
- func (t *Transaction) AvailableBuffersNum() int
- func (t *Transaction) BlockSize() int32
- func (t *Transaction) Commit() error
- func (t *Transaction) Int32(blockID file.BlockID, offset int32) (int32, error)
- func (t *Transaction) Pin(blockID file.BlockID) (*buffer.Buffer, error)
- func (t *Transaction) Recover() error
- func (t *Transaction) Rollback() error
- func (t *Transaction) SetInt32(blockID file.BlockID, offset, val int32, okToLog bool) error
- func (t *Transaction) SetStr(blockID file.BlockID, offset int32, val string, okToLog bool) error
- func (t *Transaction) Size(filename string) (int32, error)
- func (t *Transaction) Str(blockID file.BlockID, offset int32) (string, error)
- func (t *Transaction) Unpin(blockID file.BlockID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupLockTable ¶
Types ¶
type CheckpointLogRecord ¶
type CheckpointLogRecord struct { }
func NewCheckpointLogRecord ¶
func NewCheckpointLogRecord() CheckpointLogRecord
func (CheckpointLogRecord) String ¶
func (r CheckpointLogRecord) String() string
func (CheckpointLogRecord) TxNum ¶
func (r CheckpointLogRecord) TxNum() int32
func (CheckpointLogRecord) Type ¶
func (r CheckpointLogRecord) Type() LogRecordType
func (CheckpointLogRecord) Undo ¶
func (r CheckpointLogRecord) Undo(_ *Transaction) error
func (CheckpointLogRecord) WriteTo ¶
func (r CheckpointLogRecord) WriteTo(lm *log.Manager) (log.SequenceNumber, error)
type CommitLogRecord ¶
type CommitLogRecord struct {
// contains filtered or unexported fields
}
func NewCommitLogRecord ¶
func NewCommitLogRecord(txNum int32) CommitLogRecord
func NewCommitLogRecordPage ¶
func NewCommitLogRecordPage(p *file.Page) CommitLogRecord
func (CommitLogRecord) String ¶
func (r CommitLogRecord) String() string
func (CommitLogRecord) TxNum ¶
func (r CommitLogRecord) TxNum() int32
func (CommitLogRecord) Type ¶
func (r CommitLogRecord) Type() LogRecordType
func (CommitLogRecord) Undo ¶
func (r CommitLogRecord) Undo(_ *Transaction) error
func (CommitLogRecord) WriteTo ¶
func (r CommitLogRecord) WriteTo(lm *log.Manager) (log.SequenceNumber, error)
type LogRecord ¶
type LogRecord interface { fmt.Stringer Type() LogRecordType TxNum() int32 Undo(tx *Transaction) error WriteTo(lm *log.Manager) (log.SequenceNumber, error) }
func NewLogRecord ¶
type LogRecordType ¶
type LogRecordType int32
const ( Checkpoint LogRecordType = iota Start Commit Rollback SetInt32 SetStr )
type RollbackLogRecord ¶
type RollbackLogRecord struct {
// contains filtered or unexported fields
}
func NewRollbackLogRecord ¶
func NewRollbackLogRecord(txNum int32) RollbackLogRecord
func NewRollbackLogRecordPage ¶
func NewRollbackLogRecordPage(p *file.Page) RollbackLogRecord
func (RollbackLogRecord) String ¶
func (r RollbackLogRecord) String() string
func (RollbackLogRecord) TxNum ¶
func (r RollbackLogRecord) TxNum() int32
func (RollbackLogRecord) Type ¶
func (r RollbackLogRecord) Type() LogRecordType
func (RollbackLogRecord) Undo ¶
func (r RollbackLogRecord) Undo(_ *Transaction) error
func (RollbackLogRecord) WriteTo ¶
func (r RollbackLogRecord) WriteTo(lm *log.Manager) (log.SequenceNumber, error)
type SetInt32LogRecord ¶
type SetInt32LogRecord struct {
// contains filtered or unexported fields
}
func NewSetInt32LogRecord ¶
func NewSetInt32LogRecord(txNum int32, blockID file.BlockID, offset, val int32) SetInt32LogRecord
func NewSetInt32LogRecordPage ¶
func NewSetInt32LogRecordPage(p *file.Page) SetInt32LogRecord
func (SetInt32LogRecord) String ¶
func (r SetInt32LogRecord) String() string
func (SetInt32LogRecord) TxNum ¶
func (r SetInt32LogRecord) TxNum() int32
func (SetInt32LogRecord) Type ¶
func (r SetInt32LogRecord) Type() LogRecordType
func (SetInt32LogRecord) Undo ¶
func (r SetInt32LogRecord) Undo(tx *Transaction) error
func (SetInt32LogRecord) WriteTo ¶
func (r SetInt32LogRecord) WriteTo(lm *log.Manager) (log.SequenceNumber, error)
type SetStrLogRecord ¶
type SetStrLogRecord struct {
// contains filtered or unexported fields
}
func NewSetStrLogRecord ¶
func NewSetStrLogRecordPage ¶
func NewSetStrLogRecordPage(p *file.Page) SetStrLogRecord
func (SetStrLogRecord) String ¶
func (r SetStrLogRecord) String() string
func (SetStrLogRecord) TxNum ¶
func (r SetStrLogRecord) TxNum() int32
func (SetStrLogRecord) Type ¶
func (r SetStrLogRecord) Type() LogRecordType
func (SetStrLogRecord) Undo ¶
func (r SetStrLogRecord) Undo(tx *Transaction) error
func (SetStrLogRecord) WriteTo ¶
func (r SetStrLogRecord) WriteTo(lm *log.Manager) (log.SequenceNumber, error)
type StartLogRecord ¶
type StartLogRecord struct {
// contains filtered or unexported fields
}
func NewStartLogRecord ¶
func NewStartLogRecord(txNum int32) StartLogRecord
func NewStartLogRecordPage ¶
func NewStartLogRecordPage(p *file.Page) StartLogRecord
func (StartLogRecord) String ¶
func (r StartLogRecord) String() string
func (StartLogRecord) TxNum ¶
func (r StartLogRecord) TxNum() int32
func (StartLogRecord) Type ¶
func (r StartLogRecord) Type() LogRecordType
func (StartLogRecord) Undo ¶
func (r StartLogRecord) Undo(_ *Transaction) error
func (StartLogRecord) WriteTo ¶
func (r StartLogRecord) WriteTo(lm *log.Manager) (log.SequenceNumber, error)
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
func (*Transaction) AvailableBuffersNum ¶
func (t *Transaction) AvailableBuffersNum() int
func (*Transaction) BlockSize ¶
func (t *Transaction) BlockSize() int32
func (*Transaction) Commit ¶
func (t *Transaction) Commit() error
func (*Transaction) Recover ¶
func (t *Transaction) Recover() error
func (*Transaction) Rollback ¶
func (t *Transaction) Rollback() error
Click to show internal directories.
Click to hide internal directories.