Documentation
¶
Index ¶
- Variables
- func GetProperty[T PropertyValue](e Entity, key string) (T, error)
- func GetRecordValue[T RecordValue](record *Record, key string) (T, error)
- type EagerResult
- type Entity
- type Neo4jOption
- type Node
- type Path
- type Point2D
- type Point3D
- type PropertyValue
- type Record
- type RecordValue
- type Relationship
Constants ¶
This section is empty.
Variables ¶
var Neo4jQueryCallStack = testutils.NewCallStack()
Functions ¶
func GetProperty ¶
func GetProperty[T PropertyValue](e Entity, key string) (T, error)
Get a property from an entity at a given key and cast or decode it to a specific type.
func GetRecordValue ¶
func GetRecordValue[T RecordValue](record *Record, key string) (T, error)
Get a value from a record at a given key and cast or decode it to a specific type.
Types ¶
type EagerResult ¶
The result of a Neo4j query.
func ExecuteQuery ¶
func ExecuteQuery(connection, query string, parameters map[string]any, opts ...Neo4jOption) (*EagerResult, error)
Executes a query or mutation on the Neo4j database.
type Neo4jOption ¶
type Neo4jOption func(*neo4jOptions)
func WithDbName ¶
func WithDbName(dbName string) Neo4jOption
type Path ¶
type Path struct {
Nodes []Node
Relationships []Relationship
}
type Point2D ¶
type Point2D struct {
X float64
Y float64
// Id of coordinate reference system.
SpatialRefId uint32
}
Point2D represents a two dimensional point in a particular coordinate reference system.
type Point3D ¶
type Point3D struct {
X float64
Y float64
Z float64
// Id of coordinate reference system.
SpatialRefId uint32
}
Point3D represents a three dimensional point in a particular coordinate reference system.
type PropertyValue ¶
type PropertyValue interface {
bool | int64 | float64 | string | time.Time |
[]byte | []any | Point2D | Point3D
}
A type constraint for retrieving property values from a Neo4j entity.
type RecordValue ¶
type RecordValue interface {
bool | int64 | float64 | string | time.Time |
[]byte | []any | map[string]any |
Node | Relationship | Path | Point2D | Point3D
}
A type constraint for retrieving values from a Neo4j record.
type Relationship ¶
type Relationship struct {
ElementId string
StartElementId string
EndElementId string
Type string
Props map[string]any
}
A relationship in a Neo4j query result.
func (*Relationship) GetElementId ¶
func (r *Relationship) GetElementId() string
func (*Relationship) GetProperties ¶
func (r *Relationship) GetProperties() map[string]any