Connections database table - TaskDepender

Connections database table

From TaskDepender
Jump to: navigation, search
(Connect)
(Connect)
Line 43: Line 43:
 
Taking these considerations into account means that the easiest way to add the clones will probably be to check the adjusted <tt>Connections</tt> table and to see for which connections no clones are present and then create a clone for each one of these. This is done as described in the following.
 
Taking these considerations into account means that the easiest way to add the clones will probably be to check the adjusted <tt>Connections</tt> table and to see for which connections no clones are present and then create a clone for each one of these. This is done as described in the following.
  
So, the first thing the SQL statement would use is a list of all the connections for which the <tt>Id</tt> is not present in the selection of the of the <tt>ConnectionId</tt> from the [[Deliverables database table|deliverables table]]. Next, a join must be made between this list and the [[Deliverables database table|deliverables]] in which the <tt>DeliverableId</tt> of the connection corresponds to the <tt>Id</tt> of the deliverable. The select statement must retrieve the column values of the deliverable with the accept ion of the <tt>ConnetionId</tt> and <tt>ContainerId</tt>. These are set respectively to the <tt>Id</tt> and <tt>TaskId</tt> of the connection.
+
So, the first thing the SQL statement would use is a list of all the connections for which the <tt>Id</tt> is not present in the selection of the of the <tt>ConnectionId</tt> from the [[Deliverables database table|deliverables table]]. From the SQLite specification<ref name="single_source">[http://www.sqlite.org/syntaxdiagrams.html#single-source Single-source syntax diagram - SQLite syntax specification]</ref> it can be seen that the resulting table can be used. The syntax diagram is given in the figure blow for reference.
 +
 
 +
[[Image:Single_source_syntax_diagram.gif]]
 +
 
 +
 
 +
Next, a join must be made between this list and the [[Deliverables database table|deliverables]] in which the <tt>DeliverableId</tt> of the connection corresponds to the <tt>Id</tt> of the deliverable. The select statement must retrieve the column values of the deliverable with the accept ion of the <tt>ConnetionId</tt> and <tt>ContainerId</tt>. These are set respectively to the <tt>Id</tt> and <tt>TaskId</tt> of the connection.
  
 
the SQL statement could just look for all those connections for which no deliverable can be found with the <tt>ConnectionId</tt> equal to the connection.
 
the SQL statement could just look for all those connections for which no deliverable can be found with the <tt>ConnectionId</tt> equal to the connection.

Revision as of 13:47, 22 November 2011