Documentation ¶
Index ¶
- type CommonDatabase
- type ObjectGatewayImpl
- func (gateway ObjectGatewayImpl) Delete(objectName string, objectID string) (bool, error)
- func (gateway ObjectGatewayImpl) Find(objectName string) []*entity.Object
- func (gateway ObjectGatewayImpl) FindAll() ([]string, error)
- func (gateway ObjectGatewayImpl) FindByID(objectName string, objectID string) (*entity.Object, error)
- func (gateway ObjectGatewayImpl) Insert(objectName string, instance interface{}) (*entity.Object, error)
- func (gateway ObjectGatewayImpl) Update(objectName string, objectID string, instance *entity.Object) (*entity.Object, error)
- type RethinkDB
- func (db RethinkDB) Connect() *r.Session
- func (db RethinkDB) ContainTable(tableName string) bool
- func (db RethinkDB) CreateTable(tableName string) bool
- func (db RethinkDB) Delete(tableName string, id string) (bool, error)
- func (db RethinkDB) Find(tableName string) []*entity.Object
- func (db RethinkDB) FindByID(tableName string, id string) (*entity.Object, error)
- func (db RethinkDB) GetTableNames() ([]string, error)
- func (db RethinkDB) Insert(tableName string, instance interface{}) (*entity.Object, error)
- func (db RethinkDB) Update(tableName string, id string, instance *entity.Object) (*entity.Object, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonDatabase ¶
type CommonDatabase interface { Connect() *r.Session CreateTable(tableName string) bool GetTableNames() ([]string, error) ContainTable(tableName string) bool Insert(tableName string, instance interface{}) (*entity.Object, error) Find(tableName string) []*entity.Object FindByID(tableName string, id string) (*entity.Object, error) Update(tableName string, id string, instance *entity.Object) (*entity.Object, error) Delete(objectName string, objectID string) (bool, error) }
CommonDatabase .
type ObjectGatewayImpl ¶
type ObjectGatewayImpl struct {
Datatbase CommonDatabase
}
ObjectGatewayImpl .
func (ObjectGatewayImpl) Delete ¶
func (gateway ObjectGatewayImpl) Delete(objectName string, objectID string) (bool, error)
Delete .
func (ObjectGatewayImpl) Find ¶
func (gateway ObjectGatewayImpl) Find(objectName string) []*entity.Object
Find .
func (ObjectGatewayImpl) FindAll ¶
func (gateway ObjectGatewayImpl) FindAll() ([]string, error)
FindAll .
func (ObjectGatewayImpl) FindByID ¶
func (gateway ObjectGatewayImpl) FindByID(objectName string, objectID string) (*entity.Object, error)
FindByID .
Click to show internal directories.
Click to hide internal directories.