<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Hugo,</p>
<p>On 2016-03-02 17:17, Hugo Mercier wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Hi Andreas,<br /><br /> On 02/03/2016 16:27, Neumann, Andreas wrote:
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Hi,<br /><br /> I am experimenting with the virtual layers. They are quite cool!<br /><br /> I have some suggesions/questions:<br /><br /><br /><br />  1. It would be nice to have a preview of my query results. Currently it<br />     is either it works - or not. If it works, but the results are wrong<br />     you have to start from scratch. I would suggest that when you press<br />     on the test button you would not only display "No error" or the<br />     error message, but maybe the first 10 rows of the result.</blockquote>
<br /> True.<br /> Note that you can also create a virtual layer using the DB Manager where<br /> it can display the first rows of a query, as it is the case for other<br /> databases.<br /> I am not sure to love having these two very close but slightly different<br /> dialogs. If anyone has a better idea in terms of usability, do not<br /> hesitate to propose :)</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Can one create new virtual layers in the DB manager? I know that I can do queries on existing layers and load it as a new layer - but is this the same thing like a virtual layer?</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"> 2. Updating the virtual layer: it would be really nice if I could<br />     edit/improve on my virtual layers without having to start completely<br />     from scratch. --> Oh - now I found out that if you select an<br />     existing virtual layer and then use "Layer" --> "Add Layer" --> "Add<br />     Virtual Layer", that you can refresh an existing virtual layer. This<br />     is really not obvious. I think this is more a usability issue.</blockquote>
<br /> Yes ... I am more used to click on the addition icon, which makes it<br /> more direct, but you are right, this is not perfect.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">ah ok - the button works as "edit" if you have the layer selected. Maybe then we should rename the tooltip from "Add Virtual Layer" to "Add or Edit Virtual Layer"</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /> An entry in the right-click menu ?</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Yes - that was my first idea - to look for an entry in the layer context menu. Of course this entry should only be there if it is a virtual layer.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /><br /> Edit - you can also use the drop down menu of the creation dialog to<br /> switch between different virtual layer definitions, as mentioned by Yves</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">yes - now I found it - thanks!</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /><br /> 3. it is not very obvious how you can reuse an already existing<br />     geometry column. I discovered it by accident, that you can use<br />     layer.geometry (regardless of the original name of the geometry<br />     column), but I think that it is not obvious. A better hint in the<br />     the tooltip would probably help.<br /> Indeed it appears to be not documented.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">This would just require an additional sentence in  the tooltip of the Query panel, after the sentence "Any functions from SQLite or Spatialite can then be used in the query.:</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">To add or access existing geometries of a table, you can use "tablename.geometry", regardless of original geometry column's name.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /><br /> 4. Unique identifier column: If you join several tables, you often have<br />     the issue that you need to create an artificial primary key. Could<br />     we offer a preconfigured builtin pkey - something like a rowid  for<br />     such cases?<br /> Good point. An autoincremented id is already generated on the feature.<br /> That may not be a problem to add a "rowid" column in that case.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">That would be cool to have.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /><br /> 5. What is the exact purpose of the "Embedded Layers" where you can<br />     add/import/remove layers? I noticed that existing layers of the<br />     project work anyway without adding/importing them first. Is the idea<br />     that you can work on layers that aren't in the project?<br /> Yes it is.<br /> You can for example embed layers from the project, save the virtual<br /> layer to a QLR and reload it in a new project, the referenced layers<br /> would not need to be already loaded.<br /> There may be some documentation needed as well here.<br /><br /></div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Maybe we could add another tooltip here, explaining that one can add layers that are not in the project - and that you need to "embed existing layers", if you want to save to a qlr and load it in a different project.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /> Should I open feature request tickets for these or are there already<br /> plans to address one or the other of the above issues?<br /> Unfortunately, no plan yet.<br /> Thanks for your tests and feedback !<br /><br /></div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Ok - I will open feature requests for the above, where useful.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div> </div>
<div>Thanks,</div>
<div>Andreas</div>
</body></html>