ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - florinpatrascu/neo4j_sips: Elixir driver for the Neo4j graph database server
Elixir driver for the Neo4j graph database server. Contribute to florinpatrascu/neo4j_sips development by creating an account on GitHub.
Visit Site

GitHub - florinpatrascu/neo4j_sips: Elixir driver for the Neo4j graph database server

GitHub - florinpatrascu/neo4j_sips: Elixir driver for the Neo4j graph database server

Neo4j.Sips

A simple Elixir driver using the Neo4j graph database REST API. Compatible with the following Neo4j servers: 2.x/3.0.x/3.1.x

Build Status Deps Status Hex.pm Hexdocs.pm

Documentation: hexdocs.pm/neo4j_sips/

You can also look at: Bolt.Sips - Elixir driver using the Bolt protocol; Neo4j's newest network protocol, designed for high-performance.

Install

Available in Hex. Edit the mix.ex file and add the neo4j_sips dependency to the deps/1 function:

def deps do
  [{:neo4j_sips, "~> 0.2"}]
end

or from Github:

def deps do
  [{:neo4j_sips, github: "florinpatrascu/neo4j_sips"}]
end

If you're using a local development copy:

def deps do
  [{:neo4j_sips, path: "../neo4j_sips"}]
end

Then add the neo4j_sips dependency the applications list:

def application do
  [applications: [:logger, :neo4j_sips],
   mod: {Neo4j.Sips.Application, []}]
end

Edit the config/config.exs and describe a Neo4j server endpoint, example:

config :neo4j_sips, Neo4j,
  url: "http://localhost:7474",
  pool_size: 5,
  max_overflow: 2,
  timeout: 15_000  # milliseconds!

Run mix do deps.get, deps.compile

If your server requires basic authentication, add this to your config file:

  basic_auth: [username: "foo", password: "bar"]
  

Or:

  token_auth: "bmVvNGo6dGVzdA==" # if using an authentication token?!

You can also specify the authentication in the url config:

  url: "http://neo4j:neo4j@localhost:7474"

Example

With a minimalist setup configured as above, and a Neo4j server running, we can connect to the server and run some queries using Elixir’s interactive shell (IEx):

$ cd <my_mix_project>
$ iex -S mix
Erlang/OTP 19 [erts-8.0.2] [source] [64-bit] ...

Interactive Elixir (1.3.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> alias Neo4j.Sips, as: Neo4j

iex(2)> Neo4j.start_link(url: "http://localhost:7474")
{:ok, #PID<0.204.0>}

iex(3)> cypher = """
  CREATE (n:Neo4jSips {title:'Elixir sipping from Neo4j', released:2015, 
    license:'MIT', neo4j_sips_test: true})
"""

iex(4)> Neo4j.query(Neo4j.conn, cypher)
{:ok, []}

iex(5)> n = Neo4j.query!(Neo4j.conn, "match (n:Neo4jSips {title:'Elixir sipping from Neo4j'}) where n.neo4j_sips_test return n")
[%{"n" => %{"license" => "MIT", "neo4j_sips_test" => true, "released" => 2015,
     "title" => "Elixir sipping from Neo4j"}}]
  

For more examples, see the test suites.

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

Contributors

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

Author

Florin T.PATRASCU (@florinpatrascu, @florin on Twitter)

License

  • Neo4j.Sips - MIT, check LICENSE file for more information.
  • Neo4j - Dual free software/commercial license, see http://neo4j.org/

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory