Ejemplo n.º 1
0
 public void AddNodeTable(string name, WTableReferenceWithAlias tableName)
 {
     if (_nodeTableDictionary.ContainsKey(name) || _edgeDictionary.ContainsKey(name))
     {
         throw new GraphViewException("Duplicate Alias");
     }
     _nodeTableDictionary.Add(name, tableName);
 }
Ejemplo n.º 2
0
 public NonFreeTable(WTableReferenceWithAlias tableReference)
 {
     this.NodeAlias      = tableReference.Alias.Value;
     this.TableReference = tableReference;
     this.Cardinality    = 1.0;
 }
Ejemplo n.º 3
0
 public virtual void Visit(WTableReferenceWithAlias node)
 {
     node.AcceptChildren(this);
 }
Ejemplo n.º 4
0
 public void AddNodeTable(string name, WTableReferenceWithAlias tableName)
 {
     if (_nodeTableDictionary.ContainsKey(name) || _edgeDictionary.ContainsKey(name))
         throw new GraphViewException("Duplicate Alias");
     _nodeTableDictionary.Add(name, tableName);
 }
Ejemplo n.º 5
0
 public virtual void Visit(WTableReferenceWithAlias node)
 {
     node.AcceptChildren(this);
 }
 /// <summary>
 /// Checks whether a table reference in the FROM clause is a node table. 
 /// In GraphView's SELECT statement, a table reference in the FROM clause 
 /// could also be a regular table. 
 /// </summary>
 /// <param name="table">The table reference in the FROM clause</param>
 /// <returns>True if the table reference is a node table; otherwise, false.</returns>
 private bool IsNodeTable(WTableReferenceWithAlias table)
 {
     var namedTable = table as WNamedTableReference;
     if (namedTable == null)
         return false;
     var tableschema = namedTable.TableObjectName.SchemaIdentifier != null
         ? namedTable.TableObjectName.SchemaIdentifier.Value
         : "dbo";
     var tableName = namedTable.TableObjectName.BaseIdentifier.Value;
     return
         _graphMetaData.ColumnsOfNodeTables.Keys.Contains(
             new Tuple<string, string>(tableschema.ToLower(CultureInfo.CurrentCulture),
                 tableName.ToLower(CultureInfo.CurrentCulture)));
 }