Ejemplo n.º 1
0
 def test_buffers(self, assert_startswith):
     assert_startswith(
         explain(
             sa.text('SELECT 1 FROM article'),
             analyze=True,
             buffers=True
         ),
         'EXPLAIN (ANALYZE true, BUFFERS true) SELECT'
     )
Ejemplo n.º 2
0
 def test_timing(self, assert_startswith):
     assert_startswith(
         explain(
             sa.text('SELECT 1 FROM article'),
             analyze=True,
             timing=False
         ),
         'EXPLAIN (ANALYZE true, TIMING false) SELECT'
     )
Ejemplo n.º 3
0
 def test_render_explain_with_analyze(
     self,
     session,
     assert_startswith,
     Article
 ):
     assert_startswith(
         explain(session.query(Article), analyze=True),
         'EXPLAIN (ANALYZE true) SELECT'
     )
Ejemplo n.º 4
0
 def test_render_explain_with_analyze(
     self,
     session,
     assert_startswith,
     Article
 ):
     assert_startswith(
         explain(session.query(Article), analyze=True),
         'EXPLAIN (ANALYZE true) SELECT'
     )
Ejemplo n.º 5
0
 def test_verbose(self, assert_startswith):
     assert_startswith(
         explain(sa.text('SELECT 1 FROM article'), verbose=True),
         'EXPLAIN (VERBOSE true) SELECT')
Ejemplo n.º 6
0
 def test_format(self, assert_startswith):
     assert_startswith(
         explain(sa.text('SELECT 1 FROM article'), format='json'),
         'EXPLAIN (FORMAT json) SELECT')
Ejemplo n.º 7
0
 def test_with_string_as_stmt_param(self, assert_startswith):
     assert_startswith(explain(sa.text('SELECT 1 FROM article')),
                       'EXPLAIN SELECT')
Ejemplo n.º 8
0
 def test_buffers(self):
     self.assert_startswith(
         explain('SELECT 1 FROM article', analyze=True, buffers=True),
         'EXPLAIN (ANALYZE true, BUFFERS true) SELECT')
Ejemplo n.º 9
0
 def test_timing(self):
     self.assert_startswith(
         explain('SELECT 1 FROM article', analyze=True, timing=False),
         'EXPLAIN (ANALYZE true, TIMING false) SELECT')
Ejemplo n.º 10
0
 def test_with_string_as_stmt_param(self):
     self.assert_startswith(explain('SELECT 1 FROM article'),
                            'EXPLAIN SELECT')
Ejemplo n.º 11
0
 def test_timing(self, assert_startswith):
     assert_startswith(
         explain('SELECT 1 FROM article', analyze=True, timing=False),
         'EXPLAIN (ANALYZE true, TIMING false) SELECT'
     )
Ejemplo n.º 12
0
 def test_format(self, assert_startswith):
     assert_startswith(
         explain('SELECT 1 FROM article', format='json'),
         'EXPLAIN (FORMAT json) SELECT'
     )
Ejemplo n.º 13
0
 def test_with_string_as_stmt_param(self, assert_startswith):
     assert_startswith(
         explain('SELECT 1 FROM article'),
         'EXPLAIN SELECT'
     )
Ejemplo n.º 14
0
 def test_render_explain(self, session, assert_startswith, Article):
     assert_startswith(
         explain(session.query(Article)),
         'EXPLAIN SELECT'
     )
Ejemplo n.º 15
0
 def test_render_explain(self):
     self.assert_startswith(
         explain(self.session.query(self.Article)),
         'EXPLAIN SELECT'
     )
Ejemplo n.º 16
0
 def test_costs(self, assert_startswith):
     assert_startswith(
         explain(sa.text('SELECT 1 FROM article'), costs=False),
         'EXPLAIN (COSTS false) SELECT')
Ejemplo n.º 17
0
 def test_render_explain(self):
     self.assert_startswith(explain(self.session.query(self.Article)),
                            'EXPLAIN SELECT')
Ejemplo n.º 18
0
 def test_verbose(self, assert_startswith):
     assert_startswith(
         explain('SELECT 1 FROM article', verbose=True),
         'EXPLAIN (VERBOSE true) SELECT'
     )
Ejemplo n.º 19
0
 def test_format(self):
     self.assert_startswith(explain('SELECT 1 FROM article', format='json'),
                            'EXPLAIN (FORMAT json) SELECT')
Ejemplo n.º 20
0
 def test_buffers(self, assert_startswith):
     assert_startswith(
         explain('SELECT 1 FROM article', analyze=True, buffers=True),
         'EXPLAIN (ANALYZE true, BUFFERS true) SELECT'
     )
Ejemplo n.º 21
0
 def test_verbose(self):
     self.assert_startswith(explain('SELECT 1 FROM article', verbose=True),
                            'EXPLAIN (VERBOSE true) SELECT')
Ejemplo n.º 22
0
 def test_costs(self, assert_startswith):
     assert_startswith(
         explain('SELECT 1 FROM article', costs=False),
         'EXPLAIN (COSTS false) SELECT'
     )
Ejemplo n.º 23
0
 def test_costs(self):
     self.assert_startswith(explain('SELECT 1 FROM article', costs=False),
                            'EXPLAIN (COSTS false) SELECT')
Ejemplo n.º 24
0
 def test_render_explain(self, session, assert_startswith, Article):
     assert_startswith(explain(session.query(Article)), 'EXPLAIN SELECT')