Documentation
¶
Index ¶
- func Module() application.Module
- type Column
- type ColumnBool
- type ColumnFloat32
- type ColumnFloat64
- type ColumnInt
- type ColumnInt16
- type ColumnInt32
- type ColumnInt64
- type ColumnInt8
- type ColumnString
- type ColumnTime
- type ColumnUint
- type ColumnUint16
- type ColumnUint32
- type ColumnUint64
- type ColumnUint8
- type ColumnX
- type DataDir
- type DataDirFactory
- type DataSource
- type Database
- type DatabaseFactory
- type Repository
- type Row
- type Session
- type SessionFactory
- type SessionManager
- type Table
- type TableFactory
- type TableOpen
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ColumnBool ¶
ColumnBool ...
type ColumnFloat32 ¶
ColumnFloat32 ...
type ColumnFloat64 ¶
ColumnFloat64 ...
type ColumnInt16 ¶
ColumnInt16 ...
type ColumnInt32 ¶
ColumnInt32 ...
type ColumnInt64 ¶
ColumnInt64 ...
type ColumnInt8 ¶
ColumnInt8 ...
type ColumnString ¶
ColumnString ...
type ColumnTime ¶
ColumnTime ...
type ColumnUint ¶
ColumnUint ...
type ColumnUint16 ¶
ColumnUint16 ...
type ColumnUint32 ¶
ColumnUint32 ...
type ColumnUint64 ¶
ColumnUint64 ...
type ColumnUint8 ¶
ColumnUint8 ...
type DataDirFactory ¶
type DataDirFactory interface {
// Init(dir fs.Path) (DataDir, error)
Open(dir fs.Path, init bool) (DataDir, error)
}
DataDirFactory 是 DataDir 的生产者
type DataSource ¶ added in v0.0.3
DataSource 代表指向DB的数据源
type Database ¶
type Database interface {
Name() string
Path() fs.Path
Owner() DataDir
OpenTable(p *TableOpen) (Table, error)
OpenSession() (Session, error)
}
Database 指向一个文件夹,是 Table 的容器
type DatabaseFactory ¶
type DatabaseFactory interface {
Open(name string, dir fs.Path, owner DataDir, init bool) (Database, error)
}
DatabaseFactory 是 Database 的生产者
type Repository ¶ added in v0.0.3
type Repository interface {
Init(ds DataSource) error
}
Repository 代表某个表的存储库
type Row ¶
type Row interface {
Owner() Table
Key() string
Delete() error
SetValue(field string, value string) error
GetValue(field string) (string, error)
Exists() bool
}
Row 指向具体的一行记录
type Session ¶
type Session interface {
io.Closer
BeginTransaction() Transaction
DB() Database
GetProperties(table Table) collection.Properties
ListIDs(table Table) []string
GetRow(table Table, key string) Row
GetRowRequired(table Table, key string) (Row, error)
}
Session 会话对象
type SessionFactory ¶
SessionFactory 会话工厂
type SessionManager ¶
SessionManager 会话管理器
type Table ¶
type Table interface {
Owner() Database
Path() fs.Path
Name() string
PrimaryKey() string
GetColumnString(name string) ColumnString
GetColumnBool(name string) ColumnBool
GetColumnTime(name string) ColumnTime
GetColumnFloat32(name string) ColumnFloat32
GetColumnFloat64(name string) ColumnFloat64
GetColumnInt(name string) ColumnInt
GetColumnInt8(name string) ColumnInt8
GetColumnInt16(name string) ColumnInt16
GetColumnInt32(name string) ColumnInt32
GetColumnInt64(name string) ColumnInt64
GetColumnUint(name string) ColumnUint
GetColumnUint8(name string) ColumnUint8
GetColumnUint16(name string) ColumnUint16
GetColumnUint32(name string) ColumnUint32
GetColumnUint64(name string) ColumnUint64
}
Table 指向一个文件,是 Entity 的容器
type TableFactory ¶
TableFactory 是 Table 的生产者
Source Files
¶
Click to show internal directories.
Click to hide internal directories.