memory

package
v0.0.0-alpha9 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RelationTuplesTable   = "relation_tuples"
	SchemaDefinitionTable = "schema_definitions"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RelationshipReader

type RelationshipReader struct {
	// contains filtered or unexported fields
}

RelationshipReader - Structure for Relationship Reader

func NewRelationshipReader

func NewRelationshipReader(database *db.Memory) *RelationshipReader

NewRelationshipReader - Creates a new RelationshipReader

func (*RelationshipReader) GetUniqueEntityIDsByEntityType

func (r *RelationshipReader) GetUniqueEntityIDsByEntityType(ctx context.Context, typ string, _ string) (array []string, err error)

GetUniqueEntityIDsByEntityType - Gets all entity IDs for a given entity type (unique)

func (*RelationshipReader) HeadSnapshot

func (r *RelationshipReader) HeadSnapshot(ctx context.Context) (token.SnapToken, error)

HeadSnapshot - Reads the latest version of the snapshot from the repository.

func (*RelationshipReader) QueryRelationships

func (r *RelationshipReader) QueryRelationships(ctx context.Context, filter *base.TupleFilter, _ string) (collection database.ITupleCollection, err error)

QueryRelationships - Reads relation tuples from the repository.

type RelationshipWriter

type RelationshipWriter struct {
	// contains filtered or unexported fields
}

func NewRelationshipWriter

func NewRelationshipWriter(database *db.Memory) *RelationshipWriter

NewRelationshipWriter - Creates a new RelationshipReader

func (*RelationshipWriter) DeleteRelationships

func (r *RelationshipWriter) DeleteRelationships(ctx context.Context, filter *base.TupleFilter) (token.EncodedSnapToken, error)

DeleteRelationships - Delete relationship from repository

func (*RelationshipWriter) WriteRelationships

func (r *RelationshipWriter) WriteRelationships(ctx context.Context, collection database.ITupleCollection) (token.EncodedSnapToken, error)

WriteRelationships - Write a Relation to repository

type SchemaReader

type SchemaReader struct {
	// contains filtered or unexported fields
}

SchemaReader - Structure for Schema Reader

func NewSchemaReader

func NewSchemaReader(database *db.Memory) *SchemaReader

NewSchemaReader - Creates a new SchemaReader

func (*SchemaReader) HeadVersion

func (r *SchemaReader) HeadVersion(ctx context.Context) (string, error)

HeadVersion - Reads the latest version from the repository.

func (*SchemaReader) ReadSchema

func (r *SchemaReader) ReadSchema(ctx context.Context, version string) (schema *base.IndexedSchema, err error)

ReadSchema - Reads a new schema from repository

func (*SchemaReader) ReadSchemaDefinition

func (r *SchemaReader) ReadSchemaDefinition(ctx context.Context, entityType string, version string) (definition *base.EntityDefinition, v string, err error)

ReadSchemaDefinition - Reads a Schema Definition from repository

type SchemaWriter

type SchemaWriter struct {
	// contains filtered or unexported fields
}

SchemaWriter - Structure for Schema Writer

func NewSchemaWriter

func NewSchemaWriter(database *db.Memory) *SchemaWriter

NewSchemaWriter creates a new SchemaWriter

func (*SchemaWriter) WriteSchema

func (r *SchemaWriter) WriteSchema(ctx context.Context, definitions []repositories.SchemaDefinition) (string, error)

WriteSchema - Write Schema to repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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