mirror of
https://github.com/FlipsideCrypto/livequery-models.git
synced 2026-02-06 19:06:49 +00:00
16 lines
468 B
SQL
16 lines
468 B
SQL
{% macro sql_udf_json_rpc_call(use_default_id=True ) %}
|
|
SELECT IFF(method IS NULL or params IS NULL,
|
|
NULL,
|
|
{
|
|
'jsonrpc': '2.0',
|
|
'method': method,
|
|
'params': params
|
|
{% if use_default_id %}
|
|
, 'id': hash(method, params)::string
|
|
{% else %}
|
|
, 'id': id
|
|
{% endif %}
|
|
}
|
|
)
|
|
{% endmacro %}
|