Class: AirbyteRuby::Adapters::Postgres
- Inherits:
-
Object
- Object
- AirbyteRuby::Adapters::Postgres
- Defined in:
- lib/airbyte_ruby/adapters/postgres.rb
Overview
Postgres type adapter for AirbyteRuby configuration
Constant Summary collapse
- TYPE =
:postgres
Instance Attribute Summary collapse
-
#database ⇒ Object
Returns the value of attribute database.
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#replication_method ⇒ Object
Returns the value of attribute replication_method.
-
#ssl_mode ⇒ Object
Returns the value of attribute ssl_mode.
-
#tunnel_method ⇒ Object
Returns the value of attribute tunnel_method.
-
#type ⇒ Object
Returns the value of attribute type.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #configuration ⇒ Object
-
#initialize(args = {}) ⇒ Postgres
constructor
A new instance of Postgres.
Constructor Details
#initialize(args = {}) ⇒ Postgres
Returns a new instance of Postgres.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 12 def initialize(args = {}) @type = TYPE.to_s @host = args[:host] @port = args[:port] @database = args[:database] @schema = args[:schema] || "public" @username = args[:username] @password = args[:password] @ssl_mode = args[:ssl_mode] @replication_method = args[:replication_method] @tunnel_method = args[:tunnel_method] end |
Instance Attribute Details
#database ⇒ Object
Returns the value of attribute database.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def database @database end |
#host ⇒ Object
Returns the value of attribute host.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def host @host end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def port @port end |
#replication_method ⇒ Object
Returns the value of attribute replication_method.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def replication_method @replication_method end |
#ssl_mode ⇒ Object
Returns the value of attribute ssl_mode.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def ssl_mode @ssl_mode end |
#tunnel_method ⇒ Object
Returns the value of attribute tunnel_method.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def tunnel_method @tunnel_method end |
#type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def type @type end |
#username ⇒ Object
Returns the value of attribute username.
9 10 11 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 9 def username @username end |
Instance Method Details
#configuration ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/airbyte_ruby/adapters/postgres.rb', line 25 def configuration { host: @host, port: @port, database: @database, schema: @schema, username: @username, password: @password, ssl_mode: @ssl_mode, replication_method: @replication_method, tunnel_method: @tunnel_method } end |