Versions in this module Expand all Collapse all v2 v2.3.10 Jul 26, 2022 v2.3.9 Jul 26, 2022 Changes in this version + const AccessModeRead + const AccessModeWrite + var DefaultPrimaryKeyStrategy = &PrimaryKeyStrategy + var ErrConfiguration = errors.New("gogm: configuration was malformed") + var ErrConnection = errors.New("gogm: connection error") + var ErrInternal = errors.New("gogm: internal error") + var ErrInvalidParams = errors.New("gogm: invalid params") + var ErrNotFound = errors.New("gogm: data not found") + var ErrTransaction = errors.New("gogm: transaction error") + var ErrValidation = errors.New("gogm: struct validation error") + var UUIDPrimaryKeyStrategy = &PrimaryKeyStrategy + func PathLoadStrategyEdgeConstraint(startVariable, startLabel, endLabel, endTargetField string, ...) (dsl.Cypher, error) + func PathLoadStrategyMany(variable, label string, depth int, additionalConstraints dsl.ConditionOperator) (dsl.Cypher, error) + func PathLoadStrategyOne(variable, label, fieldOn, paramName string, isGraphId bool, depth int, ...) (dsl.Cypher, error) + func SchemaLoadStrategyMany(gogm *Gogm, variable, label string, depth int, ...) (dsl.Cypher, error) + func SchemaLoadStrategyOne(gogm *Gogm, variable, label, fieldOn, paramName string, isGraphId bool, ...) (dsl.Cypher, error) + func SetGlobalGogm(gogm *Gogm) + type BaseNode struct + Id *int64 + LoadMap map[string]*RelationConfig + type BaseUUIDNode struct + UUID string + type Config struct + CAFileLocation string + DefaultTransactionTimeout time.Duration + EnableDriverLogs bool + EnableLogParams bool + Host string + IndexStrategy IndexStrategy + IsCluster bool + LoadStrategy LoadStrategy + LogLevel string + Logger Logger + OpentracingEnabled bool + Password string + PoolSize int + Port int + Protocol string + Realm string + TLSConfig *tls.Config + TargetDbs []string + UseSystemCertPool bool + Username string + func (c *Config) ConnectionString() string + type Edge interface + GetEndNode func() interface{} + GetEndNodeType func() reflect.Type + GetStartNode func() interface{} + GetStartNodeType func() reflect.Type + SetEndNode func(v interface{}) error + SetStartNode func(v interface{}) error + type GenerateNewIDFunc func() interface + type Gogm struct + func G() *Gogm + func New(config *Config, pkStrategy *PrimaryKeyStrategy, mapTypes ...interface{}) (*Gogm, error) + func NewContext(ctx context.Context, config *Config, pkStrategy *PrimaryKeyStrategy, ...) (*Gogm, error) + func (g *Gogm) Close() error + func (g *Gogm) Copy() *Gogm + func (g *Gogm) NewSession(conf SessionConfig) (ISession, error) + func (g *Gogm) NewSessionV2(conf SessionConfig) (SessionV2, error) + type ISession interface + Close func() error + Delete func(deleteObj interface{}) error + DeleteUUID func(uuid string) error + Load func(respObj interface{}, id string) error + LoadAll func(respObj interface{}) error + LoadAllDepth func(respObj interface{}, depth int) error + LoadAllDepthFilter func(respObj interface{}, depth int, filter dsl.ConditionOperator, ...) error + LoadAllDepthFilterPagination func(respObj interface{}, depth int, filter dsl.ConditionOperator, ...) error + LoadAllEdgeConstraint func(respObj interface{}, endNodeType, endNodeField string, ...) error + LoadDepth func(respObj interface{}, id string, depth int) error + LoadDepthFilter func(respObj interface{}, id string, depth int, filter dsl.ConditionOperator, ...) error + LoadDepthFilterPagination func(respObj interface{}, id string, depth int, filter dsl.ConditionOperator, ...) error + PurgeDatabase func() error + Query func(query string, properties map[string]interface{}, respObj interface{}) error + QueryRaw func(query string, properties map[string]interface{}) ([][]interface{}, error) + Save func(saveObj interface{}) error + SaveDepth func(saveObj interface{}, depth int) error + type ITransaction interface + Begin func() error + Commit func() error + Rollback func() error + RollbackWithError func(err error) error + type IndexStrategy int + const ASSERT_INDEX + const IGNORE_INDEX + const VALIDATE_INDEX + type InvalidDecoratorConfigError struct + Field string + Issue string + func NewInvalidDecoratorConfigError(issue, field string) *InvalidDecoratorConfigError + func (i *InvalidDecoratorConfigError) Error() string + type InvalidStructConfigError struct + func NewInvalidStructConfigError(issue string) *InvalidStructConfigError + func (i *InvalidStructConfigError) Error() string + type LoadStrategy int + const PATH_LOAD_STRATEGY + const SCHEMA_LOAD_STRATEGY + type Logger interface + Debug func(s string) + Debugf func(s string, vals ...interface{}) + Error func(s string) + Errorf func(s string, vals ...interface{}) + Fatal func(s string) + Fatalf func(s string, vals ...interface{}) + Info func(s string) + Infof func(s string, vals ...interface{}) + Warn func(s string) + Warnf func(s string, vals ...interface{}) + func GetDefaultLogger() Logger + type Pagination struct + LimitPerPage int + OrderByDesc bool + OrderByField string + OrderByVarName string + PageNumber int + func (p *Pagination) Paginate(query dsl.Cypher) error + type PrimaryKeyStrategy struct + DBName string + FieldName string + GenIDFunc GenerateNewIDFunc + StrategyName string + Type reflect.Type + type RelationConfig struct + Ids []int64 + RelationType RelationType + type RelationType int + const Multi + const Single + type Session struct + DefaultDepth int + func NewSession(readonly bool) (*Session, error) + func NewSessionWithConfig(conf SessionConfig) (*Session, error) + func (s *Session) Begin() error + func (s *Session) Close() error + func (s *Session) Commit() error + func (s *Session) Delete(deleteObj interface{}) error + func (s *Session) DeleteUUID(uuid string) error + func (s *Session) Load(respObj interface{}, id string) error + func (s *Session) LoadAll(respObj interface{}) error + func (s *Session) LoadAllDepth(respObj interface{}, depth int) error + func (s *Session) LoadAllDepthFilter(respObj interface{}, depth int, filter dsl.ConditionOperator, ...) error + func (s *Session) LoadAllDepthFilterPagination(respObj interface{}, depth int, filter dsl.ConditionOperator, ...) error + func (s *Session) LoadAllEdgeConstraint(respObj interface{}, endNodeType, endNodeField string, ...) error + func (s *Session) LoadDepth(respObj interface{}, id string, depth int) error + func (s *Session) LoadDepthFilter(respObj interface{}, id string, depth int, filter dsl.ConditionOperator, ...) error + func (s *Session) LoadDepthFilterPagination(respObj interface{}, id string, depth int, filter dsl.ConditionOperator, ...) error + func (s *Session) PurgeDatabase() error + func (s *Session) Query(query string, properties map[string]interface{}, respObj interface{}) error + func (s *Session) QueryRaw(query string, properties map[string]interface{}) ([][]interface{}, error) + func (s *Session) Rollback() error + func (s *Session) RollbackWithError(originalError error) error + func (s *Session) Save(saveObj interface{}) error + func (s *Session) SaveDepth(saveObj interface{}, depth int) error + type SessionConfig neo4j.SessionConfig + type SessionV2 interface + Begin func(ctx context.Context) error + Close func() error + ManagedTransaction func(ctx context.Context, work TransactionWork) error + type SessionV2Impl struct + DefaultDepth int + func (s *SessionV2Impl) Begin(ctx context.Context) error + func (s *SessionV2Impl) Close() error + func (s *SessionV2Impl) Commit(ctx context.Context) error + func (s *SessionV2Impl) Delete(ctx context.Context, deleteObj interface{}) error + func (s *SessionV2Impl) DeleteUUID(ctx context.Context, uuid string) error + func (s *SessionV2Impl) Load(ctx context.Context, respObj, id interface{}) error + func (s *SessionV2Impl) LoadAll(ctx context.Context, respObj interface{}) error + func (s *SessionV2Impl) LoadAllDepth(ctx context.Context, respObj interface{}, depth int) error + func (s *SessionV2Impl) LoadAllDepthFilter(ctx context.Context, respObj interface{}, depth int, ...) error + func (s *SessionV2Impl) LoadAllDepthFilterPagination(ctx context.Context, respObj interface{}, depth int, ...) error + func (s *SessionV2Impl) LoadDepth(ctx context.Context, respObj, id interface{}, depth int) error + func (s *SessionV2Impl) LoadDepthFilter(ctx context.Context, respObj, id interface{}, depth int, ...) error + func (s *SessionV2Impl) LoadDepthFilterPagination(ctx context.Context, respObj, id interface{}, depth int, ...) error + func (s *SessionV2Impl) ManagedTransaction(ctx context.Context, work TransactionWork) error + func (s *SessionV2Impl) Query(ctx context.Context, query string, properties map[string]interface{}, ...) error + func (s *SessionV2Impl) QueryRaw(ctx context.Context, query string, properties map[string]interface{}) ([][]interface{}, neo4j.ResultSummary, error) + func (s *SessionV2Impl) Rollback(ctx context.Context) error + func (s *SessionV2Impl) RollbackWithError(ctx context.Context, originalError error) error + func (s *SessionV2Impl) Save(ctx context.Context, saveObj interface{}) error + func (s *SessionV2Impl) SaveDepth(ctx context.Context, saveObj interface{}, depth int) error + type TransactionV2 interface + Commit func(ctx context.Context) error + Rollback func(ctx context.Context) error + RollbackWithError func(ctx context.Context, err error) error + type TransactionWork func(tx TransactionV2) error