Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDatabaseNotFound : ErrDatabaseNotFound = DefineError(fmt.Errorf("database not found")) // ErrTableNotFound : ErrTableNotFound = DefineError(fmt.Errorf("table not found")) // ErrFieldNotFound : ErrFieldNotFound = DefineError(fmt.Errorf("field not found")) // ErrRecordNotFound : ErrRecordNotFound = DefineError(fmt.Errorf("record not found")) // ErrSomethingWrong : ErrSomethingWrong = DefineError(fmt.Errorf("something wrong")) // ??? // ErrEmptyCondition : ErrEmptyCondition = DefineError(fmt.Errorf("empty condition")) // ??? // ErrInvalidCondition : ErrInvalidCondition = DefineError(fmt.Errorf("invalid condition")) // ??? )
TODO: more gentle implementation
Functions ¶
Types ¶
type ErrorFactory ¶
type ErrorFactory struct {
// contains filtered or unexported fields
}
ErrorFactory :
type Session ¶
type Session interface {
io.Closer
Table(ctx context.Context, name string) (Table, error)
Exec(ctx context.Context, code string) error
}
Session :
type SessionFactory ¶
SessionFactory :
type Table ¶
type Table interface {
// TODO: add methods (tentative)
GetByID(ctx context.Context, id ID, val interface{}) error
Get(ctx context.Context, val interface{}, options ...func(*QOption)) error
InsertByID(ctx context.Context, id ID, val interface{}) error
Count(ctx context.Context, options ...func(*QOption)) (int, error)
}
Table :
Click to show internal directories.
Click to hide internal directories.