/* THIS FILE IS AUTOGENERATED, DON'T EDIT! */

#include <{{ namespace }}/sql_queries.hpp>

namespace {{ namespace }}::sql {

{%- macro generate_file(service_file) %}
// Generated from {{ service_file.source }}
const USERVER_NAMESPACE::storages::Query {{ service_file.variable }} = {
R"-(
{{ service_file.contents }}
)-",
    USERVER_NAMESPACE::storages::Query::Name("{{ service_file.name }}"),
{%- if query_log_mode == QueryLogMode.FULL %}
    USERVER_NAMESPACE::storages::Query::LogMode::kFull,
{%- elif query_log_mode == QueryLogMode.NAME_ONLY %}
    USERVER_NAMESPACE::storages::Query::LogMode::kNameOnly,
{%- else %}
    {{ raise_error("unknown LogMode: ", query_log_mode) }}
{%- endif %}
};

{% endmacro -%}

{% for service_file in sql_service_files %}
{{ generate_file(service_file) }}
{% endfor -%}

{%- for service_file in yql_service_files %}
{{ generate_file(service_file) }}
{% endfor -%}
}  // namespace {{ namespace }}::sql

