Class: AssMaintainer::InfoBase::ServerIb::ServerBaseMaker Private
- Inherits:
-
DefaultMaker
- Object
- DefaultMaker
- AssMaintainer::InfoBase::ServerIb::ServerBaseMaker
- Defined in:
- lib/ass_maintainer/info_base/server_ib.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
server infobase maker
Constant Summary collapse
- REQUIRE_FIELDS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Fields of #connection_string required for 1C command
createinfobase [:dbsrvr, :dbuid, :dbms]
Instance Attribute Summary
Attributes included from Interfaces::IbMaker
Instance Method Summary collapse
-
#connection_string ⇒ Object
private
Return AssMaintainer::InfoBase#connection_string instance.
-
#entry_point ⇒ Object
private
Interfaces::IbMaker#entry_point overload.
-
#prepare_making ⇒ Object
private
Prepare #connection_string before execute making command.
-
#require_filled? ⇒ Boolean
private
True if all fields from REQUIRE_FIELDS setted in #connection_string.
-
#set_if_empty(prop, value) ⇒ Object
private
set #connection_string field
proptovalueif filedpropempty?.
Methods included from Interfaces::IbMaker
Instance Method Details
#connection_string ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return AssMaintainer::InfoBase#connection_string instance
113 114 115 |
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 113 def connection_string infobase.connection_string end |
#entry_point ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Interfaces::IbMaker#entry_point overload
79 80 81 82 |
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 79 def entry_point prepare_making super end |
#prepare_making ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Prepare #connection_string before execute making command
85 86 87 88 89 90 91 92 |
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 85 def prepare_making fail "Fields #{REQUIRE_FIELDS} must be filled" unless require_filled? cs = connection_string set_if_empty :db, cs.ref set_if_empty :crsqldb, 'Y' set_if_empty :susr, infobase.cluster_usr set_if_empty :spwd, infobase.cluster_pwd end |
#require_filled? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
True if all fields from REQUIRE_FIELDS setted in #connection_string
96 97 98 99 100 101 |
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 96 def require_filled? REQUIRE_FIELDS.each do |f| return false if infobase.connection_string.send(f).nil? end true end |
#set_if_empty(prop, value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
set #connection_string field prop to value if filed
prop empty?
107 108 109 110 |
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 107 def set_if_empty(prop, value) connection_string.send("#{prop}=", value) if\ connection_string.send(prop).to_s.empty? end |