Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/click_house/bind_index_manager.rb')
-rw-r--r--lib/click_house/bind_index_manager.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/click_house/bind_index_manager.rb b/lib/click_house/bind_index_manager.rb
new file mode 100644
index 00000000000..96b0940ce71
--- /dev/null
+++ b/lib/click_house/bind_index_manager.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module ClickHouse
+ class BindIndexManager
+ def initialize(start_index = 1)
+ @current_index = start_index
+ end
+
+ def next_bind_str
+ bind_str = "$#{@current_index}"
+ @current_index += 1
+ bind_str
+ end
+ end
+end