Commit 75a0c643 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent bed9a661
......@@ -39,6 +39,8 @@ import (
//
// Connection and objects obtained from it must be used by application only
// inside transaction where Connection was opened.
//
// Use DB.Open to open a connection.
type Connection struct {
stor IStorage // underlying storage
db *DB // Connection is part of this DB
......
......@@ -61,10 +61,12 @@ func NewDB(stor IStorage) *DB {
return &DB{stor: stor}
}
// Open opens new connection to the database. XXX @lastTid
// Open opens new connection to the database.
//
// XXX must be called under transaction.
// XXX connectin must be used under the same transaction only.
// The connection is opened to current latest database state.
//
// Open must be called under transaction.
// Opened connection must be used under the same transaction only.
//
// XXX text
//
......@@ -190,5 +192,7 @@ func (csync *connTxnSync) AfterCompletion(txn transaction.Transaction) {
conn := (*Connection)(csync)
conn.checkTxn(txn, "AfterCompletion")
// XXX check that conn was explicitly closed by user?
conn.db.put(conn)
}
......@@ -337,7 +337,10 @@ type IStorageDriver interface {
// To simplify drivets, there must be only 1 logical user of
// storage-driver level notifier interface. Ccontrary IStorage allows
// for several users of notification channel. XXX ok?
Notifier() Notifier
//
// XXX -> nil, if driver does not support notifications?
// XXX or always support them, even with FileStorage (inotify)?
//Notifier() Notifier
}
// Loader provides functionality to load objects.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment