mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Remove folders that are no longer used for older database versions.
2) Fixed RESQL tests for View/MView.
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
{% import 'sql/macros/utils.macros' as UTILS %}
|
||||
EXPLAIN ({% if format -%}
|
||||
FORMAT {{ format.upper() }}
|
||||
{%- endif %}{% if analyze is defined -%}
|
||||
, ANALYZE {{ UTILS.BOOL_TEXT(analyze) }}
|
||||
{%- endif %}{% if verbose is defined -%}
|
||||
, VERBOSE {{ UTILS.BOOL_TEXT(verbose) }}
|
||||
{%- endif %}{% if costs is defined -%}
|
||||
, COSTS {{ UTILS.BOOL_TEXT(costs) }}
|
||||
{%- endif %}{% if timing is defined -%}
|
||||
, TIMING {{ UTILS.BOOL_TEXT(timing) }}
|
||||
{%- endif %}{% if buffers is defined -%}
|
||||
, BUFFERS {{ UTILS.BOOL_TEXT(buffers) }}
|
||||
{%- endif %}{% if summary is defined -%}
|
||||
, SUMMARY {{ UTILS.BOOL_TEXT(summary) }}
|
||||
{%- endif %}) {{ sql }}
|
||||
@@ -1,14 +0,0 @@
|
||||
{% import 'sql/macros/utils.macros' as UTILS %}
|
||||
EXPLAIN ({% if format -%}
|
||||
FORMAT {{ format.upper() }}
|
||||
{%- endif %}{% if analyze is defined -%}
|
||||
, ANALYZE {{ UTILS.BOOL_TEXT(analyze) }}
|
||||
{%- endif %}{% if verbose is defined -%}
|
||||
, VERBOSE {{ UTILS.BOOL_TEXT(verbose) }}
|
||||
{%- endif %}{% if costs is defined -%}
|
||||
, COSTS {{ UTILS.BOOL_TEXT(costs) }}
|
||||
{%- endif %}{% if timing is defined -%}
|
||||
, TIMING {{ UTILS.BOOL_TEXT(timing) }}
|
||||
{%- endif %}{% if buffers is defined -%}
|
||||
, BUFFERS {{ UTILS.BOOL_TEXT(buffers) }}
|
||||
{%- endif %}) {{ sql }}
|
||||
@@ -11,4 +11,6 @@ EXPLAIN ({% if format -%}
|
||||
, TIMING {{ UTILS.BOOL_TEXT(timing) }}
|
||||
{%- endif %}{% if buffers is defined -%}
|
||||
, BUFFERS {{ UTILS.BOOL_TEXT(buffers) }}
|
||||
{%- endif %}{% if summary is defined -%}
|
||||
, SUMMARY {{ UTILS.BOOL_TEXT(summary) }}
|
||||
{%- endif %}) {{ sql }}
|
||||
|
||||
@@ -19,68 +19,12 @@ from pgadmin import tools
|
||||
|
||||
class TestExplainPlanTemplates(BaseTestGenerator):
|
||||
scenarios = [
|
||||
(
|
||||
'When rendering Postgres 9.0 template, '
|
||||
'when passing all parameters,'
|
||||
'it returns the explain plan with all parameters',
|
||||
dict(
|
||||
template_path='sqleditor/sql/default/explain_plan.sql',
|
||||
input_parameters=dict(
|
||||
sql='SELECT * FROM places',
|
||||
format='xml',
|
||||
analyze=True,
|
||||
verbose=True,
|
||||
costs=False,
|
||||
buffers=True
|
||||
),
|
||||
sql_statement='SELECT * FROM places',
|
||||
expected_return_value='EXPLAIN '
|
||||
'(FORMAT XML, ANALYZE true, '
|
||||
'VERBOSE true, COSTS false, '
|
||||
'BUFFERS true) SELECT * FROM places'
|
||||
)
|
||||
),
|
||||
(
|
||||
'When rendering Postgres 9.0 template, '
|
||||
'when not all parameters are present,'
|
||||
'it returns the explain plan with the present parameters',
|
||||
dict(
|
||||
template_path='sqleditor/sql/default/explain_plan.sql',
|
||||
input_parameters=dict(
|
||||
sql='SELECT * FROM places',
|
||||
format='json',
|
||||
buffers=True
|
||||
),
|
||||
sql_statement='SELECT * FROM places',
|
||||
expected_return_value='EXPLAIN '
|
||||
'(FORMAT JSON, BUFFERS true) '
|
||||
'SELECT * FROM places'
|
||||
)
|
||||
),
|
||||
(
|
||||
'When rendering Postgres 9.2 template, '
|
||||
'when timing is present,'
|
||||
'it returns the explain plan with timing',
|
||||
dict(
|
||||
template_path='sqleditor/sql/9.2_plus/explain_plan.sql',
|
||||
input_parameters=dict(
|
||||
sql='SELECT * FROM places',
|
||||
format='json',
|
||||
buffers=True,
|
||||
timing=False
|
||||
),
|
||||
sql_statement='SELECT * FROM places',
|
||||
expected_return_value='EXPLAIN '
|
||||
'(FORMAT JSON, TIMING false, '
|
||||
'BUFFERS true) SELECT * FROM places'
|
||||
)
|
||||
),
|
||||
(
|
||||
'When rendering Postgres 10 template, '
|
||||
'when summary is present,'
|
||||
'it returns the explain plan with summary',
|
||||
dict(
|
||||
template_path='sqleditor/sql/10_plus/explain_plan.sql',
|
||||
template_path='sqleditor/sql/default/explain_plan.sql',
|
||||
input_parameters=dict(
|
||||
sql='SELECT * FROM places',
|
||||
format='yaml',
|
||||
|
||||
Reference in New Issue
Block a user