mirror of
https://github.com/FlipsideCrypto/aptos-models.git
synced 2026-02-06 15:27:12 +00:00
* blocks table * transactions table * messages & message attributes * silver models - some tests still failing due to test data * core models / labels / validator & token metadata * updates to blocks & packages + formatting * rename to tendermint * updates * views to tables
36 lines
759 B
SQL
36 lines
759 B
SQL
{% macro if_data_call_function(
|
|
func,
|
|
target
|
|
) %}
|
|
{% if var(
|
|
"STREAMLINE_INVOKE_STREAMS"
|
|
) %}
|
|
{% if execute %}
|
|
{{ log(
|
|
"Running macro `if_data_call_function`: Calling udf " ~ func ~ " on " ~ target,
|
|
True
|
|
) }}
|
|
{% endif %}
|
|
SELECT
|
|
{{ func }}
|
|
WHERE
|
|
EXISTS(
|
|
SELECT
|
|
1
|
|
FROM
|
|
{{ target }}
|
|
LIMIT
|
|
1
|
|
)
|
|
{% else %}
|
|
{% if execute %}
|
|
{{ log(
|
|
"Running macro `if_data_call_function`: NOOP",
|
|
False
|
|
) }}
|
|
{% endif %}
|
|
SELECT
|
|
NULL
|
|
{% endif %}
|
|
{% endmacro %}
|