コード例 #1
0
        public string Compile(TableRelation edge, FacetTable targetTable, bool innerJoin = false)
        {
            /*
             * If "facetTable" exists, then the target table is found in FacetsConfig,
             * otherwise it is a table found by the route finding service.
             */

            // FIXME: Add optional TableRelation.Clause:

            var sql = $" {Join[innerJoin]} JOIN {targetTable?.ResolvedSqlJoinName ?? edge.TargetName} " +
                      $"ON {targetTable?.ResolvedAliasOrTableOrUdfName ?? edge.TargetName}.\"{edge.TargetColumnName}\" = " +
                      $"{edge.SourceName}.\"{edge.SourceColumName}\" ";

            //.GlueIf(edge.ExtraConstraint, " AND ");

            return(sql);
        }
コード例 #2
0
 public bool IsOf(TableRelation x)
 {
     return(x != null && IsOf(x.SourceName, x.TargetName));
 }
コード例 #3
0
 public static bool ExistsAny(List <GraphRoute> routes, TableRelation item)
 {
     return(routes.Any(x => x.Contains(item)));
 }
コード例 #4
0
 public bool Contains(TableRelation item)
 {
     return(Items.Any(x => x.SourceTable.TableId == item.SourceTable.TableId && x.TargetTable.TableId == item.TargetTable.TableId));
 }