typhon-project / typhonql

Typhon Query Language
Eclipse Public License 2.0
4 stars 1 forks source link

[BUG] Select all the attributes of an entity #81

Closed benatspo closed 4 years ago

benatspo commented 4 years ago

Hi,

Based on the "User" entity (relational database), I'd like to select all the data from it (with all the attributes).

Using the API, I tried:

from User user select user

String result: "{"columnNames":["user.@id"],"values":[["uuid"],["uuid2"]]}"

from User user select user.@id, user.id, user.name

String result: "{"columnNames":["user.@id","user.id","user.name"],"values":[["uuid","1","Pol"],["uuid2","2","Loup"]]}"

ML entity: `

` In the past, the first query ("from User user select user") returned all the attributes data from the entity. Is there another syntax to select all the attributes data from the entity without listing all the attributes (like in the second query)? Thank you
pinoval commented 4 years ago

Hey @benatspo, I am not sure if this has changed on purpose. Assigning @tvdstorm to this since he is more up to date with the QL syntax.

DavyLandman commented 4 years ago

We do not currently have a way to do this. You have to list the columns. We could think about a operator, but most of the times, db people don't like the select

tvdstorm commented 4 years ago

I think we expanded singular variable refs in result clauses to all attributes. Will have a look.

tvdstorm commented 4 years ago

Fixed in d865c242df797d96dd39c9d2e8a01d95f5f87eb8