<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Using the foreign key constraints to propose automatically created
    relations to the user would be a nice feature for any database. One
    problem here is, that the providers handle the database management
    themselves and only provide QGIS the information that there is a
    layer, but not from what database it comes. Maybe it would be
    possible to extract this information with the current architecture
    but for an optimal handling the provider architecture should be
    adapted to provide such information in a standard way.<br>
    <br>
    Matthias<br>
    <br>
    <div class="moz-cite-prefix">On 05/28/2014 10:54 PM, Bob and Deb
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAHEX0wwH6Qf9RJbEDAfmX0Jkph=GdtBLEzuFDg-X+aZmrNyOhQ@mail.gmail.com"
      type="cite">
      <p dir="ltr">How about querying the sqlite_master table to find
        the data type?  And why not use the constraints found in this
        query to set up the qgis relations?</p>
      <p dir="ltr">-Bob (aka cgs_bob on freenode)</p>
      <div class="gmail_quote">On May 27, 2014 6:04 AM, "Régis Haubourg"
        <<a moz-do-not-send="true"
          href="mailto:regis.haubourg@eau-adour-garonne.fr">regis.haubourg@eau-adour-garonne.fr</a>>
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          Hugo Mercier wrote<br>
          > Or<br>
          >> calculated fields in view can't be explicitly cast,
          so QGIS should have<br>
          >> to<br>
          >> guess data type based on a data scan (a major
          unadressed issue of sqlite)<br>
          ><br>
          > Hmmm I wasn't aware of this limitation in SQLITE views :(<br>
          <br>
          Yes, SQLITE does dynamic typing, so user or provider has to
          scan values to<br>
          guess the right type.<br>
          Here is a sqlite topic on that [0]<br>
          And here my initial post in qgis list [1]<br>
          <br>
          [0]<br>
          <a moz-do-not-send="true"
href="http://sqlite.1065341.n5.nabble.com/Computed-columns-in-VIEWs-return-NULL-but-should-be-able-to-be-typed-Any-ideas-td56769.html#a56770"
            target="_blank">http://sqlite.1065341.n5.nabble.com/Computed-columns-in-VIEWs-return-NULL-but-should-be-able-to-be-typed-Any-ideas-td56769.html#a56770</a><br>
          <br>
          [1]<br>
          <a moz-do-not-send="true"
href="http://osgeo-org.1560.x6.nabble.com/Spatialite-can-t-type-fields-of-a-view-td5058436.html"
            target="_blank">http://osgeo-org.1560.x6.nabble.com/Spatialite-can-t-type-fields-of-a-view-td5058436.html</a><br>
          <br>
          <br>
          <br>
          <br>
          --<br>
          View this message in context: <a moz-do-not-send="true"
href="http://osgeo-org.1560.x6.nabble.com/have-aggregate-window-expressions-ever-been-discussed-tp5142215p5142714.html"
            target="_blank">http://osgeo-org.1560.x6.nabble.com/have-aggregate-window-expressions-ever-been-discussed-tp5142215p5142714.html</a><br>
          Sent from the Quantum GIS - Developer mailing list archive at
          Nabble.com.<br>
          _______________________________________________<br>
          Qgis-developer mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
            target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
    </blockquote>
    <br>
  </body>
</html>