solver

package
v1.38.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEntityType

func GetEntityType(mappings []*types.Mapping) map[string][]string

GetEntityType obtains a map from entity key to the types.

func GetExplicitTypeProp

func GetExplicitTypeProp(mappings []*types.Mapping) map[string][]string

GetExplicitTypeProp obtains a map from type to list of predicate

func GetFuncDeps

func GetFuncDeps(mappings []*types.Mapping) (map[types.Entity]map[string]interface{}, error)

GetFuncDeps obtains the functional deps from schema mapping.

func GetInArcInfo

func GetInArcInfo(mappings []*types.Mapping, nodeType string) ([]types.InArcInfo, error)

GetInArcInfo gets the table and columns corresponding to the node properties.

func GetNodeRef

func GetNodeRef(queries []*types.Query) map[types.Node]struct{}

GetNodeRef obtains a list of node reference from query statements.

func GetNodeType

func GetNodeType(queries []*types.Query) (map[string]string, error)

GetNodeType obtains a map from node alias to the types.

func GetOutArcInfo

func GetOutArcInfo(
	mappings []*types.Mapping,
	nodeType string,
) (map[string][]types.OutArcInfo, error)

GetOutArcInfo gets the table and columns corresponding to the node properties.

func GetProvColumn

func GetProvColumn(mappings []*types.Mapping) (map[string]types.Column, error)

GetProvColumn obtains the provenance column for each table.

func GetQueryID

func GetQueryID(
	queries []*types.Query,
	matchTriple map[*types.Query]bool,
) map[*types.Query]int

GetQueryID obtains the id for query statement. If two query statements match to Triples table, they would have same query id if they have the same predciate and subject. If two query statements match to non-Triples table, they would have the same query id if they have the same subject. The same query id means they point to the same spanner table instance in SQL query.

func GetSubTypeMap

func GetSubTypeMap(tableTypesJSONFilePath string) (map[string]string, error)

GetSubTypeMap gets subtype map.

func MatchTriple

func MatchTriple(mappings []*types.Mapping, queries []*types.Query) (map[*types.Query]bool, error)

MatchTriple takes list of queries and mappings and determines whether a query matches Triples table.

func PruneMapping

func PruneMapping(mappings []*types.Mapping) []*types.Mapping

PruneMapping prunes foreign key entity mappings.

func RewriteQuery

func RewriteQuery(queries []*types.Query, subTypeMap map[string]string) []*types.Query

RewriteQuery rewrites typeOf query for entity that is a subType.

Types

This section is empty.

Jump to

Keyboard shortcuts

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