• Stars
    star
    258
  • Rank 158,189 (Top 4 %)
  • Language
    Elixir
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Neo4j driver for Elixir

logo

Neo4j driver for Elixir.

Build Status Hex.pm Hexdocs.pm

Bolt.Sips is an Elixir driver for Neo4j, providing many useful features:

  • using the Bolt protocol, the Elixir implementation - the Neo4j's newest network protocol, designed for high-performance; latest Bolt versions, are supported.
  • Can connect to a standalone Neo4j server (:direct mode) or to a Neo4j causal cluster, using the bolt+routing or the newer neo4j schemes; connecting in :routing mode.
  • Provides the user with the ability to create and manage distinct ad-hoc role-based connections to one or more Neo4j servers/databases
  • Supports transactions, simple and complex Cypher queries with or w/o parameters
  • Multi-tenancy
  • Supports Neo4j versions: 3.0.x/3.1.x/3.2.x/3.4.x/3.5.x/4.0.x/4.1.x/4.2.x

Notes:

  • Regarding Neo4j 4, stream capabilities are not yet supported.
  • If you're seeking a substitute driver, here's a compilation of repositories:

Table of Contents

Installation

Available in Hex, the package can be added to your list of dependencies, in the: mix.exs:

def deps do
  [{:bolt_sips, "~> 2.0"}]
end

Basic usage

Provided you have access to a running Neo4j server, and a project where you just added the :bolt_sips dependency, run an iex session inside the project's folder, and once inside the shell, follow this simple step-by-step example.

Start an iex session:

Erlang/OTP 21 [erts-10.2.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Interactive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help)

iex> {:ok, _neo} = Bolt.Sips.start_link(url: "bolt://neo4j:test@localhost")
{:ok, #PID<0.237.0>}

iex> conn = Bolt.Sips.conn()
#PID<0.242.0>

iex> Bolt.Sips.query!(conn, "return 1 as n") |>
...> Bolt.Sips.Response.first()
%{"n" => 1}

Please see the docs for more examples and details about this driver.

Testing

You'll need a running Neo4j server, for running the tests. Please verify that you do not store critical data on this server, as its contents will be wiped clean when the tests are running.

If you have docker available on your system, you can start an instance before running the test suite:

docker run --rm -p 7687:7687 -e 'NEO4J_AUTH=neo4j/test' neo4j:3.0.6

Neo4j versions used for test: 3.0, 3.1, 3.4, 3.5

mix test

For the stubs using boltkit, you will have to install Python 3.7 and run: pip install boltkit. After this you can run any tests tagged with :boltkit. Example:

mix test test/boltkit_test.exs --include boltkit

or:

mix test --only boltkit

Special thanks

  • Michael Schaefermeyer (@mschae), for the initial version of the Bolt protocol in Elixir: mschae/boltex

Contributors

As reported by Github: contributions to master, excluding merge commits

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Test (mix test)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

License

Copyright 2016-2020 the original author or authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

micro

a modular micro MVC framework for Java web applications
Java
86
star
2

neo4j_sips

Elixir driver for the Neo4j graph database server
Elixir
81
star
3

movies_elixir_phoenix

Neo4j with Elixir, Phoenix and Neo4j.Sips - The Movies Example Application
Elixir
37
star
4

closure_table

Closure Table for Elixir - a simple solution for storing and manipulating complex hierarchies.
Elixir
30
star
5

bolt_movies_elixir_phoenix

A very simple web application using Neo4j with Elixir, Phoenix, and: Bolt.Sips; an Elixir driver for Neo4j’s Bolt newest network protocol.
Elixir
21
star
6

vscode-elixir-snippets

Elixir code snippets for VS Code
19
star
7

elixir_grafana_loki_tempo

A very simple Elixir demo/project used for experimenting with Grafana Tempo and Loki #opentelemetry #observability #tracing
Elixir
13
star
8

libcluster_gig

A libcluster strategy for Google Managed Instance Groups
Elixir
10
star
9

jrack

a port of Rack to Java
Java
8
star
10

jpublish

JPublish provides a powerful system for managing your web site's content as well as your web site's application logic.
Java
7
star
11

neo4j_sips_models

Neo4j models, for Neo4j.Sips
Elixir
6
star
12

micro-examples

Examples of web applications or deployment solutions using the Micro MVC framework
Java
5
star
13

fixex

support for integrating ExUnit with external apps/cli, as external fixtures providers, or for mimicking external services
Elixir
4
star
14

Sinatra-HART

A Sinatra Haml, Activerecord, RSPEC and Twitter bootstrap boilerplate, with SimpleCov flavour :)
JavaScript
3
star
15

pomo-chrono

A simple yet versatile stateful jQuery Pomodori countdown timer plugin
JavaScript
2
star
16

silw

a simple ruby gem utility that allows one user to monitor several remote systems, provided he has the proper credentials and the authorization to execute remote commands
Ruby
2
star
17

bpl

A very simple gem to help you track your blood pressure
Ruby
1
star
18

mongo_fe

A simple Sinatra based web front-end that can be used for experimenting and learning MongoDB. It is also a Ruby gem :)
JavaScript
1
star
19

dnsimple_touch

a very simple DNSimple - jQTouch prototype
JavaScript
1
star
20

micro-docs

This is the Documentation web site for the Micro framework; using Micro for publishing.
CSS
1
star
21

google_playground

A repository containing small scripts that I use to manage some GCP infrastructure chores, notes, etc. Mostly Elixir of course =)
Elixir
1
star