Skip to content

Commit

Permalink
Merge pull request #30 from alieus/adapter_dispatch
Browse files Browse the repository at this point in the history
dispatching macros
  • Loading branch information
Claire Carroll authored Jun 3, 2021
2 parents e2e57a6 + 1e6a7ec commit c6b917c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion macros/compare_column_values.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{% macro compare_column_values(a_query, b_query, primary_key, column_to_compare) %}
{% macro compare_column_values(a_query, b_query, primary_key, column_to_compare) -%}
{{ return(adapter.dispatch('compare_column_values', packages = audit_helper._get_audit_helper_namespaces())(a_query, b_query, primary_key, column_to_compare)) }}
{%- endmacro %}

{% macro default__compare_column_values(a_query, b_query, primary_key, column_to_compare) -%}
with a_query as (
{{ a_query }}
),
Expand Down
6 changes: 5 additions & 1 deletion macros/compare_queries.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{% macro compare_queries(a_query, b_query, primary_key=None) %}
{% macro compare_queries(a_query, b_query, primary_key=None) -%}
{{ return(adapter.dispatch('compare_queries', packages = audit_helper._get_audit_helper_namespaces())(a_query, b_query, primary_key)) }}
{%- endmacro %}

{% macro default__compare_queries(a_query, b_query, primary_key=None) %}

with a as (

Expand Down
5 changes: 5 additions & 0 deletions macros/compare_relation_columns.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{% macro compare_relation_columns(a_relation, b_relation) %}
{{ return(adapter.dispatch('compare_relation_columns', packages=audit_helper._get_audit_helper_namespaces())(a_relation, b_relation)) }}
{% endmacro %}

{% macro default__compare_relation_columns(a_relation, b_relation) %}

with a_cols as (
{{ audit_helper.get_columns_in_relation_sql(a_relation) }}
),
Expand Down

0 comments on commit c6b917c

Please sign in to comment.