From 8043c0e6775540012c74ccc4a804cfc9e4efb483 Mon Sep 17 00:00:00 2001 From: Thomas Cioppettini <544875+tomciopp@users.noreply.github.com> Date: Tue, 20 Sep 2022 01:48:56 -0400 Subject: [PATCH] feat(Triplex): Allow users to turn off logging of SQL queries --- lib/triplex.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/triplex.ex b/lib/triplex.ex index 9c9cd24..8932de3 100644 --- a/lib/triplex.ex +++ b/lib/triplex.ex @@ -284,7 +284,7 @@ defmodule Triplex do @doc """ Returns all the tenants on the given `repo`. """ - def all(repo \\ config().repo) do + def all(repo \\ config().repo, opts \\ []) do sql = case repo.__adapter__ do Ecto.Adapters.MyXQL -> @@ -302,7 +302,7 @@ defmodule Triplex do """ end - %{rows: result} = SQL.query!(repo, sql, []) + %{rows: result} = SQL.query!(repo, sql, [], opts) result |> List.flatten()