Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

nodeLabels

All node labels in Neo4j database

Syntax

nlabels = nodeLabels(neo4jconn)

Description

example

nlabels = nodeLabels(neo4jconn) returns all node labels in the Neo4j® database using the Neo4j database connection neo4jconn. You can retrieve the entire graph or search for a subgraph using the node labels. To search the graph database for relationship types instead, see relationTypes.

Examples

collapse all

Create a Neo4j® database connection using the URL http://localhost:7474/db/data, user name neo4j, and password matlab.

url = 'http://localhost:7474/db/data';
username = 'neo4j';
password = 'matlab';

neo4jconn = neo4j(url,username,password);

Check the Message property of the Neo4j® connection object neo4jconn.

neo4jconn.Message
ans =

     []

The blank Message property indicates a successful connection.

Retrieve all node labels using the Neo4j® database connection neo4jconn.

nlabels = nodeLabels(neo4jconn)
nlabels =

  cell

    'Person'

The cell array nlabels contains a character vector for the one node label in the Neo4j® database.

Input Arguments

collapse all

Neo4j database connection, specified as a Neo4jConnect object created using the function neo4j.

Output Arguments

collapse all

Node labels in the Neo4j database, returned as a cell array of character vectors. Each character vector denotes a node label.

Introduced in R2016b

Was this topic helpful?