Class: DataDrain::Configuration
- Inherits:
-
Object
- Object
- DataDrain::Configuration
- Defined in:
- lib/data_drain/configuration.rb
Overview
Contenedor para todas las opciones de configuración del motor DataDrain.
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_region ⇒ Object
Returns the value of attribute aws_region.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#batch_size ⇒ Object
Returns the value of attribute batch_size.
-
#db_host ⇒ Object
Returns the value of attribute db_host.
-
#db_name ⇒ Object
Returns the value of attribute db_name.
-
#db_pass ⇒ Object
Returns the value of attribute db_pass.
-
#db_port ⇒ Object
Returns the value of attribute db_port.
-
#db_user ⇒ Object
Returns the value of attribute db_user.
-
#idle_in_transaction_session_timeout ⇒ Object
Returns the value of attribute idle_in_transaction_session_timeout.
-
#limit_ram ⇒ Object
Returns the value of attribute limit_ram.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#storage_mode ⇒ Object
Returns the value of attribute storage_mode.
-
#throttle_delay ⇒ Object
Returns the value of attribute throttle_delay.
-
#tmp_directory ⇒ Object
Returns the value of attribute tmp_directory.
Instance Method Summary collapse
-
#duckdb_connection_string ⇒ String
Cadena de conexión optimizada para DuckDB.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/data_drain/configuration.rb', line 14 def initialize @storage_mode = :local @db_host = "127.0.0.1" @db_port = 5432 @batch_size = 5000 @throttle_delay = 0.5 @limit_ram = nil # eg 2GB @tmp_directory = nil # eg /tmp/duckdb_work @idle_in_transaction_session_timeout = 0 @logger = Logger.new($stdout) end |
Instance Attribute Details
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def aws_access_key_id @aws_access_key_id end |
#aws_region ⇒ Object
Returns the value of attribute aws_region.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def aws_region @aws_region end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def aws_secret_access_key @aws_secret_access_key end |
#batch_size ⇒ Object
Returns the value of attribute batch_size.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def batch_size @batch_size end |
#db_host ⇒ Object
Returns the value of attribute db_host.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_host @db_host end |
#db_name ⇒ Object
Returns the value of attribute db_name.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_name @db_name end |
#db_pass ⇒ Object
Returns the value of attribute db_pass.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_pass @db_pass end |
#db_port ⇒ Object
Returns the value of attribute db_port.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_port @db_port end |
#db_user ⇒ Object
Returns the value of attribute db_user.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_user @db_user end |
#idle_in_transaction_session_timeout ⇒ Object
Returns the value of attribute idle_in_transaction_session_timeout.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def idle_in_transaction_session_timeout @idle_in_transaction_session_timeout end |
#limit_ram ⇒ Object
Returns the value of attribute limit_ram.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def limit_ram @limit_ram end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def logger @logger end |
#storage_mode ⇒ Object
Returns the value of attribute storage_mode.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def storage_mode @storage_mode end |
#throttle_delay ⇒ Object
Returns the value of attribute throttle_delay.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def throttle_delay @throttle_delay end |
#tmp_directory ⇒ Object
Returns the value of attribute tmp_directory.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def tmp_directory @tmp_directory end |
Instance Method Details
#duckdb_connection_string ⇒ String
Returns Cadena de conexión optimizada para DuckDB.
27 28 29 |
# File 'lib/data_drain/configuration.rb', line 27 def duckdb_connection_string "postgresql://#{@db_user}:#{@db_pass}@#{@db_host}:#{@db_port}/#{@db_name}?options=-c%20idle_in_transaction_session_timeout%3D#{@idle_in_transaction_session_timeout}" end |