metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomatophantastico <>
Subject [GitHub] metamodel issue #163: METAMODEL-1165: Fixed queries w/o table names (syntax:...
Date Fri, 06 Oct 2017 13:53:10 GMT
Github user tomatophantastico commented on the issue:
    To me, there are two use cases / requirements here:
    1. Make queries transferable
    2. Ease of exploring a schema and its data via SQL
    w.r.t 1)
    Yes, i think the data contexts are the place where this should be implemented. As most
(all?) non-jdbc datacontexts are extending QueryPostProcessingContext, this could perhaps
be done without too many changes.
    i generally think it is not a good idea to deal with a table "Backup_23423_hash_by_Jörg_do_not_modify.csv"
in the query, especially if it is an export of the lets say person table. Having an alias
would clear up the semantics of the query.
    "select * from person" will work on the source system, "select * from tables[0]" not.

    w.r.t. 2)
    Just iterating over tables without having the table name, does not really make sense to
me. How should the result of such a query look like?
    Most DBMs implement this via custom commands (list tables/documents...) or using tables
(SELECT table_schema,table_name FROM information_schema.tables).
    Maybe we can cook up sth. more convenient here. But i would prefer to change the semantics
of SQL.


View raw message