Skip to content

Variable Relationships like timestamp or other ID #96

Answered by nikitawootten
SomniVertix asked this question in Q&A
Discussion options

You must be logged in to vote

GoGM supports edges with additional properties ("special" edges). Special edges work a little different from regular relationships though. Take a look at the example from the ReadMe as an example:

//structs for the example (can also be found in decoder_test.go)
type VertexA struct {
	// provides required node fields
	gogm.BaseNode

    TestField         string                `gogm:"name=test_field"`
	TestTypeDefString tdString          `gogm:"name=test_type_def_string"`
	TestTypeDefInt    tdInt             `gogm:"name=test_type_def_int"`
	MapProperty       map[string]string `gogm:"name=map_property;properties"`
	SliceProperty     []string          `gogm:"name=slice_property;properties"`
    

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@SomniVertix
Comment options

@nikitawootten
Comment options

@SomniVertix
Comment options

Answer selected by nikitawootten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants