Sha256: 4926af7ce7b0bb57763707ec413b9185154499d1467b349f540cc9870a02d0d8

Contents?: true

Size: 777 Bytes

Versions: 33

Compression:

Stored size: 777 Bytes

Contents

module Neo4j::Embedded
  class EmbeddedDatabase

    class Error < StandardError
    end

    class << self
      def connect(db_location, config={})
        if Neo4j::Session.current.respond_to?(:db_location) && Neo4j::Session.current.db_location == db_location
          return Neo4j::Session.current
        else
          EmbeddedSession.new(db_location, config)
        end
      end

      def create_db(db_location)
        puts "Start embedded Neo4j db at #{db_location}"
        factory = Java::OrgNeo4jGraphdbFactory::GraphDatabaseFactory.new
        factory.newEmbeddedDatabase(db_location)
      end

      def factory_class
        Java::OrgNeo4jGraphdbFactory::GraphDatabaseFactory
        Java::OrgNeo4jTest::ImpermanentGraphDatabase
      end

    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
neo4j-core-3.1.1 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.1.0 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.8 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.7 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.6 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.5 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.4 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.3 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.2 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.1 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.rc.5 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.rc.4 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.rc.1 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.alpha.19 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.alpha.18 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.alpha.17 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.alpha.16 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.alpha.15 lib/neo4j-embedded/embedded_database.rb
neo4j-core-3.0.0.alpha.14 lib/neo4j-embedded/embedded_database.rb