Procedures

This section lists the refactored and new procedures.

v3.x v4.x Comment

db.awaitIndex (indexId :: INTEGER?, timeOutSeconds = 300 :: INTEGER?) :: VOID

db.awaitIndex (indexName :: STRING?, timeOutSeconds = 300 :: INTEGER?) :: VOID

Indexes are identified by name instead of ID.

dbms.cluster.overview() :: (id :: STRING?, addresses :: LIST? OF STRING?, role :: STRING?, groups :: LIST? OF STRING?, database :: STRING?)

dbms.cluster.overview() :: (id :: STRING?, addresses :: LIST? OF STRING?, databases :: MAP?, groups :: LIST? OF STRING?)

Show roles for all databases.

dbms.cluster.role() :: (role :: STRING?)

dbms.cluster.role (database :: STRING?) :: (role :: STRING?)

Take database name as a parameter.

dbms.cluster.routing.getRoutingTable(context :: MAP?) :: (ttl :: INTEGER?, servers :: LIST? OF MAP?)

dbms.cluster.routing.getRoutingTable (context :: MAP?, database = null :: STRING?) :: (ttl :: INTEGER?, servers :: LIST? OF MAP?)

Take database name as a parameter.

db.createIndex (index :: STRING?, providerName :: STRING?) :: (index :: STRING?, providerName :: STRING?, status :: STRING?)

db.createIndex (indexName :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, config = {} :: MAP?) :: (name :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, status :: STRING?)

  • Take labels and properties as separate lists instead of the index pattern ":Label(prop)" as an argument.

  • Those are also yielded as a result.

  • Needs indexName.

  • (Optional) Take index settings as a map.

db.createUniquePropertyConstraint (index :: STRING?, providerName :: STRING?) :: (index :: STRING?, providerName :: STRING?, status :: STRING?)

db.createUniquePropertyConstraint (constraintName :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, config = {} :: MAP?) :: (name :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, status :: STRING?)

  • Take labels and properties as separate lists instead of the index pattern ":Label(prop)" as an argument.

  • Those are also yielded as a result.

  • Needs constraintName.

  • (Optional) Take index settings as a map.

db.createNodeKey (index :: STRING?, providerName :: STRING?) :: (index :: STRING?, providerName :: STRING?, status :: STRING?)

db.createNodeKey (constraintName :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, config = {} :: MAP?) :: (name :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, status :: STRING?)

  • Take labels and properties as separate lists instead of the index pattern ":Label(prop)" as an argument.

  • Those are also yielded as a result.

  • Needs constraintName.

  • (Optional) Take index settings as a map.

db.indexes() :: (description :: STRING?, indexName :: STRING?, tokenNames :: LIST? OF STRING?, properties :: LIST? OF STRING?, state :: STRING?, type :: STRING?, progress :: FLOAT?, provider :: MAP?, id :: INTEGER?, failureMessage :: STRING?)

db.indexes() :: (id :: INTEGER?, name :: STRING?, state :: STRING?, populationPercent :: FLOAT?, uniqueness :: STRING?, type :: STRING?, entityType :: STRING?, labelsOrTypes :: LIST? OF STRING?, properties :: LIST? OF STRING?, provider :: STRING?)

  • Rename indexName to name.

  • Rename tokenNames to labelsOrTypes.

  • Rename progress to populationPercent.

  • The field type, which described entity type (node or relationship), uniqueness, and index type, is split up into type, uniqueness, and entityType.

  • The field provider is a string instead of a map.

  • description is removed in favor of db.schemaStatements.

  • failureMessage is moved to procedure db.indexDetails.

db.resampleIndex (index :: STRING?) :: VOID

db.resampleIndex (indexName :: STRING?) :: VOID

Indexes are uniquely identified by name instead of index pattern ":Label(prop)".

db.indexDetails (indexName :: STRING?) :: (id :: INTEGER?, name :: STRING?, state :: STRING?, populationPercent :: FLOAT?, uniqueness :: STRING?, type :: STRING?, entityType :: STRING?, labelsOrTypes :: LIST? OF STRING?, properties :: LIST? OF STRING?, provider :: STRING?, indexConfig :: MAP?, failureMessage :: STRING?)

Get all the information for the specified index from db.indexes, indexConfig, and failureMessage.

db.schemaStatements () :: (name :: STRING?, type :: STRING?, createStatement :: STRING?, dropStatement :: STRING?)

Get all create and drop statements needed to replicate the schema rules (indexes and constraints) for this database.

db.ping()

The client-side tooling uses this procedure to test the connection to a database. The procedure is available in all databases and always returns true.