Documentation
¶
Index ¶
- type BaseColumn
- type BaseInfo
- type CreateDBFactory
- type DBconnect
- type Link
- type MysqlDB
- type Node
- type Object
- type Service
- type SqliteDB
- func (db *SqliteDB) Connect()
- func (db *SqliteDB) Create(value interface{}) *gorm.DB
- func (db *SqliteDB) Delete(value interface{}, conds ...interface{}) *gorm.DB
- func (db *SqliteDB) Exec(sql string, values ...interface{}) *gorm.DB
- func (db *SqliteDB) Find(out interface{}, where ...interface{}) *gorm.DB
- func (db *SqliteDB) First(out interface{}, where ...interface{}) *gorm.DB
- func (db *SqliteDB) InsertIgnore(value interface{}) error
- func (db *SqliteDB) Migrator() gorm.Migrator
- func (db *SqliteDB) Raw(sql string, values ...interface{}) *gorm.DB
- func (db *SqliteDB) Select(query interface{}, args ...interface{}) *gorm.DB
- func (db *SqliteDB) Table(name string, args ...interface{}) *gorm.DB
- func (db *SqliteDB) Update(column string, value interface{}) *gorm.DB
- func (db *SqliteDB) Updates(value interface{}) *gorm.DB
- func (db *SqliteDB) Where(query interface{}, args ...interface{}) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseColumn ¶
type BaseColumn struct { CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` DeletedAt *time.Time `gorm:"column:deleted_at"` }
gorm.Model definition
type CreateDBFactory ¶
func (*CreateDBFactory) CreateDBConnect ¶
func (db *CreateDBFactory) CreateDBConnect(db_type string) DBconnect
func (*CreateDBFactory) InitDB ¶
func (db *CreateDBFactory) InitDB() DBconnect
func (*CreateDBFactory) SetDatabaseName ¶ added in v0.0.8
func (db *CreateDBFactory) SetDatabaseName(databaseName string)
func (*CreateDBFactory) SetIsInternalStore ¶ added in v0.0.7
func (db *CreateDBFactory) SetIsInternalStore(value bool)
type DBconnect ¶
type DBconnect interface { Init(address string, port int64, account string, passwd string) Create(value interface{}) *gorm.DB Updates(value interface{}) *gorm.DB Update(column string, value interface{}) *gorm.DB Delete(value interface{}, conds ...interface{}) *gorm.DB Select(query interface{}, args ...interface{}) *gorm.DB Where(query interface{}, args ...interface{}) *gorm.DB First(out interface{}, where ...interface{}) *gorm.DB Find(out interface{}, where ...interface{}) *gorm.DB Connect() // HasTable(dst ...interface{}) bool // CreateTable(dst ...interface{}) error //AutoMigrate(dst ...interface{}) error Exec(sql string, values ...interface{}) *gorm.DB Raw(sql string, values ...interface{}) *gorm.DB Table(name string, args ...interface{}) *gorm.DB Migrator() gorm.Migrator InsertIgnore(value interface{}) error }
type Link ¶
type Link struct { BaseColumn LinkId string `gorm:"column:link_id"` OldLinkId string `gorm:"column:old_link_id"` LastNodeId string `gorm:"column:last_node_id"` NodeID string `gorm:"column:node_id"` }
Link model definition
type Node ¶
type Node struct { BaseColumn NodeId string `gorm:"column:node_id"` NodeType string `gorm:"column:node_type"` LamportClock int64 `gorm:"column:lamport_clock"` ReceivingTimestamp int32 `gorm:"column:receiving_timestamp"` ReceivingDate string `gorm:"column:receiving_date"` SendingDate string `gorm:"column:sending_date"` SendingTimestamp int32 `gorm:"column:sending_timestamp"` LastNodeId string `gorm:"column:last_node_id"` }
Node model definition
type Service ¶
type Service struct { BaseColumn ServiceId string `gorm:"column:link_id"` Cid string `gorm:"column:cid"` Ip string `gorm:"column:ip"` }
Link model definition
Click to show internal directories.
Click to hide internal directories.