Documentation
¶
Index ¶
- func Init()
- func NewSqlHandler() database.SqlHandler
- type SqlHandler
- func (handler *SqlHandler) Create(value interface{}) *gorm.DB
- func (handler *SqlHandler) Delete(value interface{}) *gorm.DB
- func (handler *SqlHandler) Find(value interface{}) *gorm.DB
- func (hander *SqlHandler) FindBy(value interface{}, id int) *gorm.DB
- func (handler *SqlHandler) Save(value interface{}) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSqlHandler ¶
func NewSqlHandler() database.SqlHandler
Types ¶
type SqlHandler ¶
type SqlHandler struct {
// contains filtered or unexported fields
}
func (*SqlHandler) Create ¶
func (handler *SqlHandler) Create(value interface{}) *gorm.DB
データベースへの値の挿入するメソッド
func (*SqlHandler) Delete ¶
func (handler *SqlHandler) Delete(value interface{}) *gorm.DB
指定された条件に合う値を削除する。値に主キーがある場合は、主キーを条件に含む。
func (*SqlHandler) Find ¶
func (handler *SqlHandler) Find(value interface{}) *gorm.DB
指定された条件に一致するレコードを探すメソッド
func (*SqlHandler) Save ¶
func (handler *SqlHandler) Save(value interface{}) *gorm.DB
データベースの値を更新し、値に主キーがない場合は挿入するメソッド
Click to show internal directories.
Click to hide internal directories.