relation

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const EdgeName = "relation"

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterOptions

type FilterOptions struct {
	OnlyFromType     *int64
	OnlyFromId       *string
	OnlyToType       *int64
	OnlyToId         *string
	OnlyRelationType *int64
}

type Neo4jFilter

type Neo4jFilter struct {
	*FilterOptions
	// contains filtered or unexported fields
}

func (*Neo4jFilter) CheckOnlyFromId

func (f *Neo4jFilter) CheckOnlyFromId()

func (*Neo4jFilter) CheckOnlyFromType

func (f *Neo4jFilter) CheckOnlyFromType()

func (*Neo4jFilter) CheckOnlyRelationType

func (f *Neo4jFilter) CheckOnlyRelationType()

func (*Neo4jFilter) CheckOnlyToId

func (f *Neo4jFilter) CheckOnlyToId()

func (*Neo4jFilter) CheckOnlyToType

func (f *Neo4jFilter) CheckOnlyToType()

type Neo4jMapper

type Neo4jMapper struct {
	DataBase string
	// contains filtered or unexported fields
}

func (Neo4jMapper) CreateEdge

func (n Neo4jMapper) CreateEdge(ctx context.Context, relation *genrelation.Relation) error

func (Neo4jMapper) DeleteEdge

func (n Neo4jMapper) DeleteEdge(ctx context.Context, relation *genrelation.Relation) error

func (Neo4jMapper) MatchEdge

func (n Neo4jMapper) MatchEdge(ctx context.Context, relation *genrelation.Relation) (bool, error)

func (Neo4jMapper) MatchFromEdges

func (n Neo4jMapper) MatchFromEdges(ctx context.Context, fromType int64, fromId string, toType int64, relationType int64, options *pagination.PaginationOptions) ([]*genrelation.Relation, error)

func (Neo4jMapper) MatchFromEdgesAndCount

func (n Neo4jMapper) MatchFromEdgesAndCount(ctx context.Context, fromType int64, fromId string, toType int64, relationType int64, options *pagination.PaginationOptions) ([]*genrelation.Relation, int64, error)

func (Neo4jMapper) MatchFromEdgesCount

func (n Neo4jMapper) MatchFromEdgesCount(ctx context.Context, fromType int64, fromId string, toType int64, relationType int64) (int64, error)

func (Neo4jMapper) MatchToEdges

func (n Neo4jMapper) MatchToEdges(ctx context.Context, toType int64, toId string, fromType int64, relationType int64, options *pagination.PaginationOptions) ([]*genrelation.Relation, error)

func (Neo4jMapper) MatchToEdgesAndCount

func (n Neo4jMapper) MatchToEdgesAndCount(ctx context.Context, toType int64, toId string, fromType int64, relationType int64, options *pagination.PaginationOptions) ([]*genrelation.Relation, int64, error)

func (Neo4jMapper) MatchToEdgesCount

func (n Neo4jMapper) MatchToEdgesCount(ctx context.Context, toType int64, toId string, fromType int64, relationType int64) (int64, error)

type RelationNeo4jMapper

type RelationNeo4jMapper interface {
	CreateEdge(ctx context.Context, relation *genrelation.Relation) error
	MatchEdge(ctx context.Context, relation *genrelation.Relation) (bool, error)
	DeleteEdge(ctx context.Context, relation *genrelation.Relation) error
	MatchFromEdges(ctx context.Context, fromType int64, fromId string, toType int64, relationType int64, options *pagination.PaginationOptions) ([]*genrelation.Relation, error)
	MatchToEdges(ctx context.Context, toType int64, toId string, fromType int64, relationType int64, options *pagination.PaginationOptions) ([]*genrelation.Relation, error)
	MatchFromEdgesCount(ctx context.Context, fromType int64, fromId string, toType int64, relationType int64) (int64, error)
	MatchToEdgesCount(ctx context.Context, toType int64, toId string, fromType int64, relationType int64) (int64, error)
	MatchFromEdgesAndCount(ctx context.Context, fromType int64, fromId string, toType int64, relationType int64, options *pagination.PaginationOptions) ([]*genrelation.Relation, int64, error)
	MatchToEdgesAndCount(ctx context.Context, toType int64, toId string, fromType int64, relationType int64, options *pagination.PaginationOptions) ([]*genrelation.Relation, int64, error)
}

func NewNeo4jMapper

func NewNeo4jMapper(config *config.Config) RelationNeo4jMapper

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL