Skip to content
No description, website, or topics provided.
C++ CMake Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake Initial commit May 29, 2019
src
tests Initial commit May 29, 2019
.gitignore
CMakeLists.txt Initial commit May 29, 2019
LICENSE Initial commit May 29, 2019
README.md Add startup command to usage example in README.md May 31, 2019

README.md

mgconsole

mgconsole is a command line interface for Memgraph database.

Building and installing

To build and install mgconsole from source you will need:

  • CMake version >= 3.4
  • OpenSSL version >= 1.0.2
  • C compiler supporting C11
  • C++ compiler supporting C++14 with support for Filesystem TS (at least experimental)
  • mgclient library and headers
  • readline library and headers

Once everything is in place, create a build directory inside the source directory and configure the build by running CMake from it:

$ mkdir build
$ cd build
$ cmake ..

After running CMake, you should see a Makefile in the build directory. Then you can build the project by running:

make

This will build the mgconsole binary. To install it, run make install. This will install to system default installation directory. If you want to change this location, use -DCMAKE_INSTALL_PREFIX option when running CMake.

Example usage

$ mgconsole --host 127.0.0.1 --port 7687 --use-ssl=false
mgconsole 0.1
Type :help for shell usage
Quit the shell by typing Ctrl-D(eof) or :quit
Connected to 'memgraph://127.0.0.1:7687'
memgraph> :help
In interactive mode, user can enter cypher queries and supported commands.

Cypher queries can span through multiple lines and conclude with a
semi-colon (;). Each query is executed in the database and the results
are printed out.

The following interactive commands are supported:

        :help    Print out usage for interactive mode
        :quit    Exit the shell

memgraph>
memgraph> MATCH (t:Turtle) RETURN t;
+-------------------------------------------+
| t                                         |
+-------------------------------------------+
| (:Turtle {color: "blue", name: "Leo"})    |
| (:Turtle {color: "purple", name: "Don"})  |
| (:Turtle {color: "orange", name: "Mike"}) |
| (:Turtle {color: "red", name: "Raph"})    |
+-------------------------------------------+
4 rows in set (0.000 sec)
memgraph> :quit
Bye
You can’t perform that action at this time.