Menu

link (as table) subquery with its alias

PAscal
2011-02-18
2013-04-15
  • PAscal

    PAscal - 2011-02-18

    Hello

    Select t.id from (select id from test) t;

    Generates two nodes without edge.
    Would it be possible to add one edge (of a new type) between the subquery node and its alias T ?

    Regards
    PAscal

     
  • alxtoth

    alxtoth - 2011-03-17

    The subselect is not correlated with the outer select. There is no table.field in (select) .

    All that this does is to select again the fields from the subselect . Why joining the outer and inner id fields?

    -Alex

     
  • alxtoth

    alxtoth - 2011-03-17

    Hmm, this is actually a bug

     
  • PAscal

    PAscal - 2011-03-17

    No, there isn't any bug here !!!

    The question is more to find a way to keep the information that subquery is called T.
    This could be done by adding:
    - a label/comment in the subquery graph,
    - a new kink of edge/link between node/subgraph - node/subgraph (not field to field),
    - the alias node in the subgraph perimeter (proposal transmitted directly to your e-email with a .dot exemple)

    This could be difficult …

    Regards
    PAscal

     
  • alxtoth

    alxtoth - 2011-03-21

    See v0.40 for subselects . In previous versions used to do same: add a dummy node in subselect and link to it.

     

Log in to post a comment.