def test_with(self): "query: with magic" q = Query() q.select("column_1") q.with_("select this from that", "_this") q.tables("from table") self.assertEqual(q({}), "with _this as (select this from that) select column_1__into__ from table")
def test_with(self): "query: with magic" q = Query() q.select("column_1") q.with_("select this from that", "_this") q.tables("from table") self.assertEqual( q({}), "with _this as (select this from that) select column_1__into__ from table" )
def test_with_false(self): "query: with reduced" q = Query() q.select("column_1") q.with_("with _that ()") q.with_(False) q.with_("select this from that", "_that") q.tables("from table") self.assertEqual(q({}), "with _that as (select this from that) select column_1__into__ from table")
def test_with_false(self): "query: with reduced" q = Query() q.select("column_1") q.with_("with _that ()") q.with_(False) q.with_("select this from that", "_that") q.tables("from table") self.assertEqual( q({}), "with _that as (select this from that) select column_1__into__ from table" )