Documentation
¶
Index ¶
- Constants
- func EvalStatement(db *DB, selection Selection, statement Statement) ([]mcmodel.Activity, []mcmodel.Entity)
- func LoadProject(projectID int)
- type Activity2Entity
- type AndStatement
- type DB
- type MatchStatement
- type OrStatement
- type ProcessSelection
- type SampleSelection
- type SampleState
- type Selection
- type Statement
Constants ¶
View Source
const ( ProcessFieldType = 1 SampleFieldType = 2 ProcessAttributeFieldType = 3 SampleAttributeFieldType = 4 ProcessFuncType = 5 SampleFuncType = 6 )
Variables ¶
This section is empty.
Functions ¶
func EvalStatement ¶
func EvalStatement(db *DB, selection Selection, statement 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)
Types ¶
type Activity2Entity ¶
Activity2Entity represents the join table for mapping the relationships between processes and samples.
func (Activity2Entity) TableName ¶
func (Activity2Entity) TableName() string
type AndStatement ¶
type DB ¶
type DB struct {
ProjectID 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 MatchStatement ¶
type OrStatement ¶
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
}
type Statement ¶
type Statement interface {
// contains filtered or unexported methods
}
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.
Click to show internal directories.
Click to hide internal directories.