provider

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorRecordNotFound    = "result contains no records"
	ErrorRecordMoreThanOne = "result contains more than one record"
)
View Source
const (
	Equal = "Equal"
	In    = "In"

	Descending = "Descending"
	Ascending  = "Ascending"
)

Variables

This section is empty.

Functions

func RecordUnmarshal

func RecordUnmarshal(data interface{}, v interface{}) error

func TranslateFilter

func TranslateFilter(query *Query, q []string, f map[string]interface{}) ([]string, map[string]interface{})

func TranslateQuery

func TranslateQuery(query *Query) (string, string, string, map[string]interface{})

Types

type Filter

type Filter struct {
	Condition string
	Field     string
	Value     interface{}
}

func NewFilter

func NewFilter(field, condition string, value interface{}) *Filter

NewFilter creates a new property filter

type Neo4J

type Neo4J struct {
	Address     string
	Username    string
	Password    string
	MaxConnPool int
	Encrypted   bool
	LogEnabled  bool
	LogLevel    int
}

func (Neo4J) Driver

func (n Neo4J) Driver() (neo4j.Driver, error)

type Ordering

type Ordering struct {
	Field     string
	Direction string
}

func NewOrdering

func NewOrdering(field, direction string) *Ordering

type Query

type Query struct {
	Node      string
	Limit     int
	Offset    int
	Incomings []*Query
	Outgoings []*Query
	Filters   []*Filter
	Orderings []*Ordering
}

func NewQuery

func NewQuery(node string) *Query

func (*Query) Filter

func (q *Query) Filter(property, condition string, value interface{}) *Query

Filter adds a filter to the query

func (*Query) Incoming

func (q *Query) Incoming(query *Query) *Query

func (*Query) Ordering

func (q *Query) Ordering(property, direction string) *Query

Order adds a sort order to the query

func (*Query) Outgoing

func (q *Query) Outgoing(query *Query) *Query

func (*Query) Slice

func (q *Query) Slice(offset, limit int) *Query

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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