Documentation
      ¶
    
    
  
    
  
    Index ¶
- func EvalStatement(db *DB, selection Selection, statement parser.Statement) ([]mcmodel.Activity, []mcmodel.Entity)
 - func LoadProject(projectID int)
 - func MapToStatement(m map[string]interface{}) parser.Statement
 - type Activity2Entity
 - type DB
 - type Experiment2Activity
 - type Experiment2Entity
 - type ProcessSelection
 - type SampleSelection
 - type SampleState
 - type Selection
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalStatement ¶
func EvalStatement(db *DB, selection Selection, statement parser.Statement) ([]mcmodel.Activity, []mcmodel.Entity)
EvalStatement runs a query and returns the results. At the moment selection is a simple boolean flag on whether to return samples and/or processes from the matches.
func LoadProject ¶
func LoadProject(projectID int)
func MapToStatement ¶
MapToStatement takes a map, which represents the converted JSON payload for a statement and converts it to statement. It recursively calls itself to build out the full statement.
Types ¶
type Activity2Entity ¶
Activity2Entity represents the join table for mapping the relationships between processes and samples.
func (Activity2Entity) TableName ¶
func (Activity2Entity) TableName() string
type DB ¶
type DB struct {
	ProjectID    int
	ExperimentID int
	DatasetID    int
	// Process and process data lookups
	Processes                    []mcmodel.Activity
	AllProcessAttributes         []*mcmodel.Attribute
	ProcessAttributesByProcessID map[int]map[string]*mcmodel.Attribute
	ProcessSamples               map[int][]*mcmodel.Entity
	// Sample and sample data lookups
	Samples             []mcmodel.Entity
	SampleProcesses     map[int][]*mcmodel.Activity
	AllSampleAttributes []*mcmodel.Attribute
	SampleAttributesBySampleIDAndStates map[int]map[int]map[string]*mcmodel.Attribute
	// contains filtered or unexported fields
}
    type Experiment2Activity ¶
type Experiment2Entity ¶
type ProcessSelection ¶
type SampleSelection ¶
type SampleState ¶
type SampleState struct {
	EntityStateID int
	// contains filtered or unexported fields
}
    SampleState is the state associated with a sample. The IDs contained in the structures are used to look up items in the hash tables in the DB.
type Selection ¶
type Selection struct {
	ProcessSelection ProcessSelection
	SampleSelection  SampleSelection
}
     Click to show internal directories. 
   Click to hide internal directories.