dbtype

package
v5.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 32

Documentation

Overview

Package dbtype contains definitions of supported database types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date time.Time // Date value, without a time zone and time related components.

func (Date) String added in v5.17.0

func (t Date) String() string

String returns the string representation of this Date in ISO-8601 compliant form: `YYYY-MM-DD`.

func (Date) Time

func (t Date) Time() time.Time

Time casts Date to time.Time

type Duration

type Duration struct {
	Months  int64
	Days    int64
	Seconds int64
	Nanos   int
}

Duration represents temporal amount containing months, days, seconds and nanoseconds. Supports longer durations than time.Duration

func (Duration) Equal

func (d1 Duration) Equal(d2 Duration) bool

func (Duration) String

func (d Duration) String() string

String returns the string representation of this Duration in ISO-8601 compliant form.

type Entity added in v5.4.0

type Entity interface {
	// Deprecated: GetId is deprecated and will be removed in 6.0. Use GetElementId instead.
	GetId() int64
	GetElementId() string
	GetProperties() map[string]any
}

type InvalidValue

type InvalidValue struct {
	Message string
	Err     error
}

func (*InvalidValue) String

func (i *InvalidValue) String() string

type LocalDateTime

type LocalDateTime time.Time // Date and time in local timezone

func (LocalDateTime) String added in v5.17.0

func (t LocalDateTime) String() string

String returns the string representation of this LocalDateTime in ISO-8601 compliant form: `YYYY-MM-DDThh:mm:ss.nnnnnnnnn`.

func (LocalDateTime) Time

func (t LocalDateTime) Time() time.Time

Time casts LocalDateTime to time.Time

Note that the resulting time.Time will have its location set to time.Local. From the DBMS's perspective, however, a LocalDateTime is considered to not have any timezone information.

type LocalTime

type LocalTime time.Time // Time since start of day in local timezone

func (LocalTime) String added in v5.17.0

func (t LocalTime) String() string

String returns the string representation of this LocalTime in ISO-8601 compliant form: `hh:mm:ss.nnnnnnnnn`.

func (LocalTime) Time

func (t LocalTime) Time() time.Time

Time casts LocalTime to time.Time

Note that the resulting time.Time will have its location set to time.Local. From the DBMS's perspective, however, a LocalTime is considered to not have any timezone information.

type Node

type Node struct {
	// Deprecated: Id is deprecated and will be removed in 6.0. Use ElementId instead.
	Id        int64          // Id of this Node.
	ElementId string         // ElementId of this Node.
	Labels    []string       // Labels attached to this Node.
	Props     map[string]any // Properties of this Node.
}

Node represents a node in the neo4j graph database

func (Node) GetElementId added in v5.4.0

func (n Node) GetElementId() string

func (Node) GetId added in v5.4.0

func (n Node) GetId() int64

func (Node) GetProperties added in v5.4.0

func (n Node) GetProperties() map[string]any

type Path

type Path struct {
	Nodes         []Node // All the nodes in the path.
	Relationships []Relationship
}

Path represents a directed sequence of relationships between two nodes. This generally represents a traversal or walk through a graph and maintains a direction separate from that of any relationships traversed. It is allowed to be of size 0, meaning there are no relationships in it. In this case, it contains only a single node which is both the start and the end of the path.

type Point2D

type Point2D struct {
	X            float64
	Y            float64
	SpatialRefId uint32 // Id of coordinate reference system.
}

Point2D represents a two dimensional point in a particular coordinate reference system.

func (Point2D) String

func (p Point2D) String() string

String returns string representation of this point.

type Point3D

type Point3D struct {
	X            float64
	Y            float64
	Z            float64
	SpatialRefId uint32 // Id of coordinate reference system.
}

Point3D represents a three dimensional point in a particular coordinate reference system.

func (Point3D) String

func (p Point3D) String() string

String returns string representation of this point.

type Relationship

type Relationship struct {
	// Deprecated: Id is deprecated and will be removed in 6.0. Use ElementId instead.
	Id        int64  // Id of this Relationship.
	ElementId string // ElementId of this Relationship.
	// Deprecated: StartId is deprecated and will be removed in 6.0. Use StartElementId instead.
	StartId        int64  // Id of the start Node of this Relationship.
	StartElementId string // ElementId of the start Node of this Relationship.
	// Deprecated: EndId is deprecated and will be removed in 6.0. Use EndElementId instead.
	EndId        int64          // Id of the end Node of this Relationship.
	EndElementId string         // ElementId of the end Node of this Relationship.
	Type         string         // Type of this Relationship.
	Props        map[string]any // Properties of this Relationship.
}

Relationship represents a relationship in the neo4j graph database

func (Relationship) GetElementId added in v5.4.0

func (r Relationship) GetElementId() string

func (Relationship) GetId added in v5.4.0

func (r Relationship) GetId() int64

func (Relationship) GetProperties added in v5.4.0

func (r Relationship) GetProperties() map[string]any

type Time

type Time time.Time // Time since start of day with timezone information

func (Time) String added in v5.17.0

func (t Time) String() string

String returns the string representation of this Time in ISO-8601 compliant form: `hh:mm:ss.nnnnnnnnn±Z/hh:mm`.

func (Time) Time

func (t Time) Time() time.Time

Time casts Time to time.Time

Jump to

Keyboard shortcuts

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