From 7d26fd748a7fdf97343d380077c80b4813c5516b Mon Sep 17 00:00:00 2001 From: Yuri Smirnov Date: Wed, 11 Dec 2024 16:54:45 +0300 Subject: [PATCH] optimize with_temp_table --- Gemfile.lock | 2 +- lib/umbrellio_utils/database.rb | 1 + lib/umbrellio_utils/version.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 03658d0..648d082 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - umbrellio-utils (1.5.4) + umbrellio-utils (1.5.5) memery (~> 1) GEM diff --git a/lib/umbrellio_utils/database.rb b/lib/umbrellio_utils/database.rb index f45cc20..4b0170b 100644 --- a/lib/umbrellio_utils/database.rb +++ b/lib/umbrellio_utils/database.rb @@ -97,6 +97,7 @@ def create_temp_table(dataset, primary_key: nil, temp_table_name: nil) private def row(values) + return values if values.size == 1 Sequel.function(:row, *values) end diff --git a/lib/umbrellio_utils/version.rb b/lib/umbrellio_utils/version.rb index 8c1845b..968ef5d 100644 --- a/lib/umbrellio_utils/version.rb +++ b/lib/umbrellio_utils/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module UmbrellioUtils - VERSION = "1.5.4" + VERSION = "1.5.5" end