jpgql

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Foliage graph store jpgql package. Provides stateful functions of json-path graph query language for the graph store

Index

Constants

View Source
const QueryResultTopic = "functions.graph.query"

Variables

This section is empty.

Functions

func GetAllLinksFromSpecifiedLinkType added in v0.1.3

func GetAllLinksFromSpecifiedLinkType(cacheStore *cache.Store, objectID string, linkType string) [][]string

func GetObjectIDsFromLinkType

func GetObjectIDsFromLinkType(cacheStore *cache.Store, objectID string, linkType string) map[string]int

func GetObjectIDsFromLinkTypeAndFilterData

func GetObjectIDsFromLinkTypeAndFilterData(cacheStore *cache.Store, objectID string, linkType string, filterData *FilterData) map[string]int

func GetObjectIDsFromLinkTypeAndLinkFilterQuery

func GetObjectIDsFromLinkTypeAndLinkFilterQuery(cacheStore *cache.Store, objectID string, linkType string, linkFilterQuery string) map[string]int

func GetObjectIDsFromLinkTypeAndLinkFilterQueryWithAnyDepthStop

func GetObjectIDsFromLinkTypeAndLinkFilterQueryWithAnyDepthStop(cacheStore *cache.Store, objectID string, linkType string, linkFilterQuery string, anyDepthStop *AnyDepthStop) map[string]int

func GetSpecificLinkIndices added in v0.1.3

func GetSpecificLinkIndices(cacheStore *cache.Store, fromObjectID string, linkType string, toObjectId string) map[string]struct{}

func LLAPIQueryJPGQLCallTreeResultAggregation

func LLAPIQueryJPGQLCallTreeResultAggregation(executor sfPlugins.StatefunExecutor, contextProcessor *sfPlugins.StatefunContextProcessor)

Uses JPGQL call-tree result aggregation algorithm to find objects

Request:

payload: json - required
	// Initial request from caller
	query_id: string - optional // ID for this query.
	jpgql_query: string - required // Json path query
	call: json - optional // A call to be done on found targets
		typename: string - required // Typename to be called
		payload: json - required // Data for typename to be called with

	// Self-requests to descendants: (ID is composite: <object_id>===<process_id> - for async execution)
	query_id: string - required // ID for this query.
	caller_aggregation_id: string - required // Id which descendants will send to caller when sending its results
	jpgql_query: string - required // Json path query
	call: json - optional // A call to be done on found targets
		typename: string - required // Typename to be called
		payload: json - required // Data for typename to be called with

options: json - optional
	eval_timeout_sec: int - optional // Execution timeout

Reply:

payload: json
	query_id: string // ID for this query.
	aggregation_id: string // Id which to use to aggregate result
	result: []string // Found objects

func LLAPIQueryJPGQLDirectCacheResultAggregation

func LLAPIQueryJPGQLDirectCacheResultAggregation(executor sfPlugins.StatefunExecutor, contextProcessor *sfPlugins.StatefunContextProcessor)

Uses JPGQL direct cache result aggregation algorithm to find objects

Request:

payload: json - required
	// Initial request from caller:
	query_id: string - optional // ID for this query.
	jpgql_query: string - required // Json path query
	call: json - optional // A call to be done on found targets
		typename: string - required // Typename to be called
		payload: json - required // Data for typename to be called with

	// Self-requests to descendants: (ID is composite: <object_id>===<process_id> - for async execution)
	aggregation_id: string - required // Original ID for the search query.
	jpgql_query: string - required // Json path query
	call: json - optional // A call to be done on found targets
		typename: string - required // Typename to be called
		payload: json - required // Data for typename to be called with

options: json - optional
	eval_timeout_sec: int - optional // Execution timeout

Reply:

payload: json
	query_id: string // ID for this query.
	aggregation_id: string // Id which to use to aggregate result
	result: []string // Found objects

func RegisterAllFunctionTypes

func RegisterAllFunctionTypes(runtime *statefun.Runtime, jpgqlEvaluationTimeoutSec int)

Types

type AnyDepthStop

type AnyDepthStop struct {
	LinkType    string
	FilterQeury string
	QueryTail   string
}

func GetQueryHeadAndTailsParts

func GetQueryHeadAndTailsParts(query string) (string, string, string, *AnyDepthStop, error)

type FilterData

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

func NewFilterDataWithConjunctionFeatures added in v0.1.3

func NewFilterDataWithConjunctionFeatures(conjunctionFeatures []filterFeature) *FilterData

func NewFilterDataWithOneFeature added in v0.1.3

func NewFilterDataWithOneFeature(feature filterFeature) *FilterData

func ParseFilter

func ParseFilter(filterQuery string) (*FilterData, error)

Jump to

Keyboard shortcuts

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