mirror of
https://github.com/FlipsideCrypto/fsc-utils.git
synced 2026-02-06 02:46:59 +00:00
test macros
This commit is contained in:
parent
f1b129935b
commit
84a954d74e
@ -1,8 +0,0 @@
|
||||
{%- set name -%}
|
||||
{{- udf_configs() -}}
|
||||
{% endset %}
|
||||
{% set udfs = fromyaml(name) %}
|
||||
{%- for udf in udfs -%}
|
||||
{{- create_or_drop_function_from_config(udf, drop_=True) -}}
|
||||
{{- create_or_drop_function_from_config(udf, drop_=False) -}}
|
||||
{% endfor %}
|
||||
@ -2,7 +2,7 @@
|
||||
func_name,
|
||||
signature
|
||||
) %}
|
||||
DROP FUNCTION IF EXISTS {{ func_name }}({{ compile_signature(signature, drop_ = True) }});
|
||||
DROP FUNCTION IF EXISTS {{ func_name }}({{ reference_models.compile_signature(signature, drop_ = True) }});
|
||||
{% endmacro %}
|
||||
|
||||
{%- macro construct_api_route(route) -%}
|
||||
@ -35,7 +35,7 @@
|
||||
func_type = none
|
||||
) %}
|
||||
CREATE OR REPLACE {{ func_type }} FUNCTION {{ name_ }}(
|
||||
{{- compile_signature(signature) }}
|
||||
{{- reference_models.compile_signature(signature) }}
|
||||
)
|
||||
COPY GRANTS
|
||||
RETURNS {{ return_type }}
|
||||
@ -44,7 +44,7 @@
|
||||
{% endif %}
|
||||
{%- if api_integration -%}
|
||||
api_integration = {{ api_integration }}
|
||||
AS {{ construct_api_route(sql_) ~ ";" }}
|
||||
AS {{ reference_models.construct_api_route(sql_) ~ ";" }}
|
||||
{% else -%}
|
||||
AS
|
||||
$$
|
||||
@ -76,7 +76,7 @@
|
||||
func_type = func_type
|
||||
) }}
|
||||
{%- else -%}
|
||||
{{ drop_function(
|
||||
{{ reference_models.drop_function(
|
||||
name_,
|
||||
signature = signature,
|
||||
) }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user