Class SchemaTableTree

java.lang.Object
org.umlg.sqlg.sql.parse.SchemaTableTree

public class SchemaTableTree extends Object
Date: 2015/01/08 Time: 7:06 AM
  • Field Details

  • Constructor Details

  • Method Details

    • constructDistinctOptionalQueries

      public static void constructDistinctOptionalQueries(SchemaTableTree current, List<org.apache.commons.lang3.tuple.Pair<LinkedList<SchemaTableTree>,Set<SchemaTableTree>>> result)
    • constructDistinctEmitBeforeQueries

      public static void constructDistinctEmitBeforeQueries(SchemaTableTree current, List<LinkedList<SchemaTableTree>> result)
    • splitIntoSubStacks

      public static List<LinkedList<SchemaTableTree>> splitIntoSubStacks(LinkedList<SchemaTableTree> distinctQueryStack)
    • loadEager

      public void loadEager()
    • addLabel

      public void addLabel(String label)
    • getPropertyDefinitions

      public Map<String,PropertyDefinition> getPropertyDefinitions()
    • getAliasMapHolder

      public AliasMapHolder getAliasMapHolder()
    • setAliasMapHolder

      public void setAliasMapHolder(AliasMapHolder aliasMapHolder)
    • getColumnNameAliasMap

      public Map<String,String> getColumnNameAliasMap()
    • getAliasColumnNameMap

      public Map<String,String> getAliasColumnNameMap()
    • getAllIdentifiers

      public Set<String> getAllIdentifiers()
    • isEmit

      public boolean isEmit()
    • isOptionalLeftJoin

      public boolean isOptionalLeftJoin()
    • isOuterLeftJoin

      public boolean isOuterLeftJoin()
    • resetColumnAliasMaps

      public void resetColumnAliasMaps()
    • getSchemaTable

      public SchemaTable getSchemaTable()
    • constructSql

      public String constructSql(LinkedList<SchemaTableTree> distinctQueryStack)
    • constructSqlForOptional

      public String constructSqlForOptional(LinkedList<SchemaTableTree> innerJoinStack, Set<SchemaTableTree> leftJoinOn)
    • constructDropSql

      public List<SqlgSqlExecutor.DropQuery> constructDropSql(LinkedList<SchemaTableTree> distinctQueryStack)
    • constructDistinctQueries

      public List<LinkedList<SchemaTableTree>> constructDistinctQueries()
    • hasBulkWithinOrOut

      public boolean hasBulkWithinOrOut()
    • getRecursiveRepeatStepConfig

      public RecursiveRepeatStepConfig getRecursiveRepeatStepConfig()
    • isRecursiveQuery

      public boolean isRecursiveQuery()
    • setUntilTraversalRootSchemaTableTree

      public void setUntilTraversalRootSchemaTableTree(SchemaTableTree untilTraversalRootSchemaTableTree)
    • duplicatesInStack

      public boolean duplicatesInStack(LinkedList<SchemaTableTree> distinctQueryStack)
      Checks if the stack has the same element more than once.
      Parameters:
      distinctQueryStack - The stack to check for duplicates
      Returns:
      true is there are duplicates else false
    • labeledAliasId

      public String labeledAliasId()
    • lastMappedAliasIdentifier

      public String lastMappedAliasIdentifier(String identifier)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toTreeString

      public String toTreeString()
    • getDirection

      public org.apache.tinkerpop.gremlin.structure.Direction getDirection()
    • getHasContainers

      public List<org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer> getHasContainers()
    • getAdditionalPartitionHasContainers

      public List<org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer> getAdditionalPartitionHasContainers()
    • getAndOrHasContainers

      public List<AndOrHasContainer> getAndOrHasContainers()
    • getSqlgComparatorHolder

      public SqlgComparatorHolder getSqlgComparatorHolder()
    • getStepDepth

      public int getStepDepth()
    • getReplacedStepDepth

      public int getReplacedStepDepth()
    • testHashCode

      public int testHashCode()
    • close

      public void close()
      closing the SchemaTableTree indicates that this SchemaTableTree is complete and that no moore changing of its state it allowed. This allows us to cache the hashCode for performance reasons.
    • isHasIdentifierPrimaryKeyInHierarchy

      public boolean isHasIdentifierPrimaryKeyInHierarchy()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getLabels

      public Set<String> getLabels()
    • hasLabels

      public boolean hasLabels()
    • getRealLabelsCache

      public Set<String> getRealLabelsCache()
    • isUntilFirst

      public boolean isUntilFirst()
    • loadProperty

      public void loadProperty(ResultSet resultSet, SqlgElement sqlgElement) throws SQLException
      Throws:
      SQLException
    • loadProperty

      public void loadProperty(ResultSet resultSet, SqlgElement sqlgElement, List<LinkedHashMap<ColumnList.Column,String>> columnsStack) throws SQLException
      Throws:
      SQLException
    • loadEdgeInOutVertices

      public void loadEdgeInOutVertices(ResultSet resultSet, SqlgEdge sqlgEdge) throws SQLException
      Throws:
      SQLException
    • loadIdentifierObjects

      public List<Comparable> loadIdentifierObjects(Map<String,Integer> idColumnCountMap, ResultSet resultSet) throws SQLException
      Throws:
      SQLException
    • isLocalStep

      public boolean isLocalStep()
    • isLocalBarrierStep

      public boolean isLocalBarrierStep()
    • isFakeEmit

      public boolean isFakeEmit()
    • setFakeEmit

      public void setFakeEmit(boolean fakeEmit)
    • getStepType

      public SchemaTableTree.STEP_TYPE getStepType()
    • getParentIdsAndIndexes

      public List<org.apache.commons.lang3.tuple.Pair<RecordId.ID,Long>> getParentIdsAndIndexes()
    • setParentIdsAndIndexes

      public void setParentIdsAndIndexes(List<org.apache.commons.lang3.tuple.Pair<RecordId.ID,Long>> parentIdsAndIndexes)
    • removeDbComparators

      public void removeDbComparators()
    • isDrop

      public boolean isDrop()
    • isHasIDPrimaryKey

      public boolean isHasIDPrimaryKey()
    • getIdentifiers

      public org.apache.commons.collections4.set.ListOrderedSet<String> getIdentifiers()
    • getRootColumnListStack

      public List<ColumnList> getRootColumnListStack()
    • getRestrictedProperties

      public Set<String> getRestrictedProperties()
    • shouldSelectProperty

      public boolean shouldSelectProperty(String property)
      should we select the given property?
      Parameters:
      property - the property name
      Returns:
      true if the property should be part of the select clause, false otherwise
    • hasAggregateFunction

      public boolean hasAggregateFunction()
    • getAggregateFunction

      public org.apache.commons.lang3.tuple.Pair<String,List<String>> getAggregateFunction()
    • getGroupBy

      public List<String> getGroupBy()
    • hasLeafNodes

      public boolean hasLeafNodes()
    • schemaTableTreeForLabel

      public SchemaTableTree schemaTableTreeForLabel(String label)