arangodb

package
v0.0.0-...-4b0d5d3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FMap = map[string]string{
	"created_at":   "s.created_at",
	"updated_at":   "s.updated_at",
	"depositor":    "s.depositor",
	"summary":      "s.summary",
	"id":           "s.stock_id",
	"gene":         "s.genes",
	"plasmid":      "stock_prop.plasmid",
	"species":      "stock_prop.species",
	"name":         "stock_prop.names",
	"label":        "stock_prop.label",
	"ontology":     "cv.metadata.namespace",
	"tag":          "cvterm.label",
	"parent":       "parent",
	"plasmid_name": "name",
}

FMap maps filters to database fields

Functions

func NewStockRepo

NewStockRepo acts as constructor for database

Types

type CollectionParams

type CollectionParams struct {
	// Stock is the collection for storing all stocks
	Stock string `validate:"required"`
	// Stockprop is the collection for storing stock properties
	StockProp string `validate:"required"`
	// StockKeyGenerator is the collection for generating unique stock IDs
	StockKeyGenerator string `validate:"required"`
	// StockType is the edge collection for connecting stocks to their types
	StockType string `validate:"required"`
	// ParentStrain is the edge collection for connecting strains to their parents
	ParentStrain string `validate:"required"`
	// StockPropTypeGraph is the named graph for connecting stock properties to types
	StockPropTypeGraph string `validate:"required"`
	// Strain2ParentGraph is the named graph for connecting strains to their parents
	Strain2ParentGraph string `validate:"required"`
	// KeyOffset is the initial offset for stock id generation. It is needed to
	// maintain the previous stock identifiers.
	KeyOffset int `validate:"required"`
	// StockTerm is the edge collection for connecting stock with an ontology
	// term
	StockTerm string `validate:"required"`
	// StockOntoGraph is the named graph for connecting stock
	// with the ontology
	StockOntoGraph string `validate:"required"`
	// StrainOntology is the name ontology for storing strain group
	StrainOntology string `validate:"required"`
}

CollectionParams are the arangodb collections required for storing stocks

type PairWiseIterator

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

PairWiseIterator is the container for iterator

func NewPairWiseIterator

func NewPairWiseIterator(m []*model.StockDoc) (*PairWiseIterator, error)

NewPairWiseIterator is the constructor, returns error in case of empty or slice with single element

func (*PairWiseIterator) NextPair

func (p *PairWiseIterator) NextPair() bool

NextPair moves the iteration to the next pair. If NextPair() returns true the pair could be retrieved by Pair() method. If it is called for the first time it points to the first pair.

func (*PairWiseIterator) Pair

func (p *PairWiseIterator) Pair() (*model.StockDoc, *model.StockDoc)

Pair retrieves the pair of elements from the slice

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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