Implement star
Implement *
for selection of all columns, allowing to select columns with conflicting names.
from querybuilder.queries.dql import Select
from querybuilder.queries.algebra.columns import Star, make_column
t = Select([make_column(0), make_column(1), make_column(2)], aliases={0: "x", 1: "y", 2: "x"}).alias("t")
q = t.select([Star])
print(str(t))
should give
SELECT * FROM (SELECT 0 AS x, 1 AS y, 2 AS x) AS t
Notice than currently, it is not possible to select columns other than t.y
from t
since name x
is conflicting.
Edited by Bruno Guillon