Documentation ¶
Index ¶
- func GetVidWithPolicy(vid interface{}, policy constants.Policy) string
- type Config
- type DB
- func (db *DB) Bidirect() (tx *DB)
- func (db *DB) Close()
- func (db *DB) Count(out interface{}) error
- func (db *DB) Debug() (tx *DB)
- func (db *DB) DebugMode()
- func (db *DB) Execute(sql string) (*dialectors.ResultSet, error)
- func (db *DB) ExecuteAndParse(sql string, in interface{}) error
- func (db *DB) From(vs ...IVertex) (tx *DB)
- func (db *DB) Go(step int) (tx *DB)
- func (db *DB) Group(fields ...string) (tx *DB)
- func (db *DB) InsertEdge(in IEdge) error
- func (db *DB) InsertVertex(in IVertex) error
- func (db *DB) Limit(limit int) (tx *DB)
- func (db *DB) Over(edges ...IEdge) (tx *DB)
- func (db *DB) Return(out interface{}) error
- func (db *DB) ReturnRow() (*dialectors.ResultSet, error)
- func (db *DB) Reversely() (tx *DB)
- func (db *DB) UpsertEdge(in IEdge) error
- func (db *DB) UpsertVertex(in IVertex) error
- func (db *DB) Where(sql string) (tx *DB)
- func (db *DB) Yield(sql string) (tx *DB)
- type DefaultLogger
- type EModel
- type IEdge
- type ITag
- type IVertex
- type Logger
- type Option
- type VModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVidWithPolicy ¶
Types ¶
type Config ¶
type Config struct { DebugMode bool // contains filtered or unexported fields }
func (*Config) LoadDefault ¶
func (config *Config) LoadDefault()
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func MustOpen ¶
func MustOpen(dialector dialectors.IDialector, cfg Config, opts ...Option) *DB
MustOpen 语法糖. 如果 error 则 panic, 适用于强依赖 db 的场景
func Open ¶
func Open(dialector dialectors.IDialector, cfg Config, opts ...Option) (*DB, error)
Open initialize nebula connect pool
func (*DB) Execute ¶
func (db *DB) Execute(sql string) (*dialectors.ResultSet, error)
Execute 执行某条sql
func (*DB) ExecuteAndParse ¶
ExecuteAndParse 执行某条sql, 然后解析为传入的结构. in 可以是 map[string]interface{}, *Strcut, *[]map, *[]struct
func (*DB) ReturnRow ¶
func (db *DB) ReturnRow() (*dialectors.ResultSet, error)
ReturnRow 返回 nsql 执行的原始结果, 不进行任何加工
func (*DB) UpsertVertex ¶
UpsertVertex 解析结构体, 然后 Upsert 一个点.
type DefaultLogger ¶
type DefaultLogger = nebula.DefaultLogger
type EModel ¶
type EModel struct { Src interface{} `norm:"-"` SrcPolicy constants.Policy `norm:"-"` Dst interface{} `norm:"-"` DstPolicy constants.Policy `norm:"-"` }
func (EModel) GetVidDstPolicy ¶
func (EModel) GetVidSrcPolicy ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
* * package: dialectors * file: dirlector.go * author: wuzhensheng * create: 2021-06-23 11:52:00 * description: *
|
* * package: dialectors * file: dirlector.go * author: wuzhensheng * create: 2021-06-23 11:52:00 * description: * |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
internal
|
|
Click to show internal directories.
Click to hide internal directories.