Class: Neo4j::Http::Client
- Inherits:
-
Object
- Object
- Neo4j::Http::Client
- Defined in:
- lib/neo4j/http/client.rb
Constant Summary collapse
- CYPHER_CLIENT_METHODS =
%i[execute_cypher].freeze
- NODE_CLIENT_METHODS =
%i[delete_node find_node_by find_nodes_by upsert_node].freeze
- RELATIONSHIP_CLIENT_METHODS =
%i[delete_relationship upsert_relationship delete_relationship_on_primary_key].freeze
- CLIENT_METHODS =
(CYPHER_CLIENT_METHODS + NODE_CLIENT_METHODS + RELATIONSHIP_CLIENT_METHODS).freeze
Instance Attribute Summary collapse
-
#cypher_client ⇒ Object
Returns the value of attribute cypher_client.
-
#node_client ⇒ Object
Returns the value of attribute node_client.
-
#relationship_client ⇒ Object
Returns the value of attribute relationship_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cypher_client, node_client, relationship_client) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(cypher_client, node_client, relationship_client) ⇒ Client
Returns a new instance of Client.
24 25 26 27 28 |
# File 'lib/neo4j/http/client.rb', line 24 def initialize(cypher_client, node_client, relationship_client) @cypher_client = cypher_client @node_client = node_client @relationship_client = relationship_client end |
Instance Attribute Details
#cypher_client ⇒ Object
Returns the value of attribute cypher_client.
22 23 24 |
# File 'lib/neo4j/http/client.rb', line 22 def cypher_client @cypher_client end |
#node_client ⇒ Object
Returns the value of attribute node_client.
22 23 24 |
# File 'lib/neo4j/http/client.rb', line 22 def node_client @node_client end |
#relationship_client ⇒ Object
Returns the value of attribute relationship_client.
22 23 24 |
# File 'lib/neo4j/http/client.rb', line 22 def relationship_client @relationship_client end |
Class Method Details
.default ⇒ Object
14 15 16 17 18 19 |
# File 'lib/neo4j/http/client.rb', line 14 def default cypher_client = Http::CypherClient.new(Neo4j::Http.config) node_client = Http::NodeClient.new(cypher_client) relationship_client = Http::RelationshipClient.new(cypher_client) @default ||= new(cypher_client, node_client, relationship_client) end |