From: Matt S Trout Date: Sat, 13 Apr 2019 17:21:52 +0000 (+0000) Subject: subselect in from renders ok X-Git-Tag: v2.000000~3^2~245 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b770fe2950fb9b2b9f78b3f924b881c47e96c5c9;p=dbsrgits%2FSQL-Abstract.git subselect in from renders ok --- diff --git a/xt/clauses.t b/xt/clauses.t index 450b616..8b7427f 100644 --- a/xt/clauses.t +++ b/xt/clauses.t @@ -88,4 +88,12 @@ is_same_sql( q{SELECT x.*, y.* FROM x JOIN y USING (y_id)}, ); +is_same_sql( + $sqlac->select({ + select => 'x.*', + from => [ { -select => { select => '*', from => 'y' } }, -as => 'x' ], + }), + q{SELECT x.* FROM (SELECT * FROM y) AS x}, +); + done_testing;