Documentation
¶
Index ¶
- Constants
- type Config
- type Database
- func (db *Database) CreateCollection(name string) (*collection.Collection, error)
- func (db *Database) CreateCollectionSpec(name string, spec collection.CollectionSpec) (*collection.Collection, error)
- func (db *Database) DropCollection(name string) error
- func (db *Database) GetCollection(name string) (*collection.Collection, bool)
- func (db *Database) GetStatus() string
- func (db *Database) ListCollections() map[string]*collection.Collection
- func (db *Database) Load() error
- func (db *Database) Start() error
- func (db *Database) Stop() error
Constants ¶
View Source
const ( StatusOpening = "opening" StatusOperating = "operating" StatusClosing = "closing" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
Config *Config
Collections map[string]*collection.Collection
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) CreateCollection ¶ added in v0.0.2
func (db *Database) CreateCollection(name string) (*collection.Collection, error)
func (*Database) CreateCollectionSpec ¶ added in v0.0.18
func (db *Database) CreateCollectionSpec(name string, spec collection.CollectionSpec) (*collection.Collection, error)
func (*Database) DropCollection ¶ added in v0.0.2
func (*Database) GetCollection ¶ added in v0.0.18
func (db *Database) GetCollection(name string) (*collection.Collection, bool)
func (*Database) ListCollections ¶ added in v0.0.18
func (db *Database) ListCollections() map[string]*collection.Collection
Click to show internal directories.
Click to hide internal directories.