Sha256: 53d5b73c3e49f8d6c10cddb098065e2104d794d1423662a8875d6de9facb93fc

Contents?: true

Size: 821 Bytes

Versions: 24

Compression:

Stored size: 821 Bytes

Contents

module Neo4j
  module Core
    class CypherSession
      attr_reader :adaptor

      def initialize(adaptor)
        fail ArgumentError, "Invalid adaptor: #{adaptor.inspect}" if !adaptor.is_a?(Adaptors::Base)

        @adaptor = adaptor

        @adaptor.connect
      end

      def transaction_class
        Neo4j::Core::CypherSession::Transactions::Base
      end

      %w(
        version
      ).each do |method, &_block|
        define_method(method) do |*args, &block|
          @adaptor.send(method, *args, &block)
        end
      end

      %w(
        query
        queries

        transaction

        indexes
        constraints
      ).each do |method, &_block|
        define_method(method) do |*args, &block|
          @adaptor.send(method, self, *args, &block)
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
neo4j-core-7.2.0 lib/neo4j/core/cypher_session.rb
neo4j-core-7.1.2 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.9 lib/neo4j/core/cypher_session.rb
neo4j-core-7.1.1 lib/neo4j/core/cypher_session.rb
neo4j-core-7.1.0 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.8 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.7 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.6 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.5 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.4 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.3 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.2 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.1 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.0 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.0.rc.2 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.0.rc.1 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.0.alpha.8 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.0.alpha.7 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.0.alpha.6 lib/neo4j/core/cypher_session.rb
neo4j-core-7.0.0.alpha.5 lib/neo4j/core/cypher_session.rb