Class: PgPipeline::ServerCaps
- Inherits:
-
Object
- Object
- PgPipeline::ServerCaps
- Defined in:
- lib/pg_pipeline/server_caps.rb
Constant Summary collapse
- REQUIRED_LIBPQ_VERSION =
140_000- FAST_SYNC_LIBPQ_VERSION =
170_000- PROTOCOL_VERSION =
3
Instance Attribute Summary collapse
-
#fast_sync_api ⇒ Object
readonly
Returns the value of attribute fast_sync_api.
-
#libpq_version ⇒ Object
readonly
Returns the value of attribute libpq_version.
-
#pipeline_api ⇒ Object
readonly
Returns the value of attribute pipeline_api.
-
#protocol_version ⇒ Object
readonly
Returns the value of attribute protocol_version.
-
#raw_pipeline_sync_api ⇒ Object
readonly
Returns the value of attribute raw_pipeline_sync_api.
Class Method Summary collapse
Instance Method Summary collapse
- #assert_supported! ⇒ Object
- #fast_sync? ⇒ Boolean
-
#initialize(libpq_version:, protocol_version:, pipeline_api: true, fast_sync_api: false, raw_pipeline_sync_api: false) ⇒ ServerCaps
constructor
A new instance of ServerCaps.
- #place_sync(conn) ⇒ Object
- #supported? ⇒ Boolean
Constructor Details
#initialize(libpq_version:, protocol_version:, pipeline_api: true, fast_sync_api: false, raw_pipeline_sync_api: false) ⇒ ServerCaps
Returns a new instance of ServerCaps.
16 17 18 19 20 21 22 23 |
# File 'lib/pg_pipeline/server_caps.rb', line 16 def initialize(libpq_version:, protocol_version:, pipeline_api: true, fast_sync_api: false, raw_pipeline_sync_api: false) @libpq_version = Integer(libpq_version) @protocol_version = Integer(protocol_version) @pipeline_api = pipeline_api @fast_sync_api = fast_sync_api @raw_pipeline_sync_api = raw_pipeline_sync_api end |
Instance Attribute Details
#fast_sync_api ⇒ Object (readonly)
Returns the value of attribute fast_sync_api.
13 14 15 |
# File 'lib/pg_pipeline/server_caps.rb', line 13 def fast_sync_api @fast_sync_api end |
#libpq_version ⇒ Object (readonly)
Returns the value of attribute libpq_version.
13 14 15 |
# File 'lib/pg_pipeline/server_caps.rb', line 13 def libpq_version @libpq_version end |
#pipeline_api ⇒ Object (readonly)
Returns the value of attribute pipeline_api.
13 14 15 |
# File 'lib/pg_pipeline/server_caps.rb', line 13 def pipeline_api @pipeline_api end |
#protocol_version ⇒ Object (readonly)
Returns the value of attribute protocol_version.
13 14 15 |
# File 'lib/pg_pipeline/server_caps.rb', line 13 def protocol_version @protocol_version end |
#raw_pipeline_sync_api ⇒ Object (readonly)
Returns the value of attribute raw_pipeline_sync_api.
13 14 15 |
# File 'lib/pg_pipeline/server_caps.rb', line 13 def raw_pipeline_sync_api @raw_pipeline_sync_api end |
Class Method Details
.from_connection(conn) ⇒ Object
25 |
# File 'lib/pg_pipeline/server_caps.rb', line 25 def self.from_connection(conn) = Caps.from_connection(conn) |
Instance Method Details
#assert_supported! ⇒ Object
27 |
# File 'lib/pg_pipeline/server_caps.rb', line 27 def assert_supported! = Caps.assert_supported!(self) |
#fast_sync? ⇒ Boolean
28 |
# File 'lib/pg_pipeline/server_caps.rb', line 28 def fast_sync? = Caps.fast_sync?(self) |
#place_sync(conn) ⇒ Object
29 |
# File 'lib/pg_pipeline/server_caps.rb', line 29 def place_sync(conn) = Caps.place_sync(self, conn) |
#supported? ⇒ Boolean
26 |
# File 'lib/pg_pipeline/server_caps.rb', line 26 def supported? = Caps.supported?(self) |