Refine search
@Deprecated @Description( "Change the current user's password. Deprecated by dbms.security.changePassword." ) @Procedure( name = "dbms.changePassword", mode = DBMS, deprecatedBy = "dbms.security.changePassword" ) public void changePasswordDeprecated( @Name( "password" ) String password ) throws InvalidArgumentsException, IOException { // TODO: Deprecate this and create a new procedure that takes password as a byte[] changePassword( password ); }
@Deprecated @Description( "Show the current user. Deprecated by dbms.showCurrentUser." ) @Procedure( name = "dbms.security.showCurrentUser", mode = DBMS, deprecatedBy = "dbms.showCurrentUser" ) public Stream<UserResult> showCurrentUserDeprecated() { return showCurrentUser(); }
@Description( "Wait for an index to come online (for example: CALL db.awaitIndex(\":Person(name)\"))." ) @Procedure( name = "db.awaitIndex", mode = READ ) public void awaitIndex( @Name( "index" ) String index, @Name( value = "timeOutSeconds", defaultValue = "300" ) long timeout ) throws ProcedureException { try ( IndexProcedures indexProcedures = indexProcedures() ) { indexProcedures.awaitIndexByPattern( index, timeout, TimeUnit.SECONDS ); } }
@Deprecated @Description( "Show the schema of the data." ) @Procedure( name = "db.schema", mode = READ, deprecatedBy = DB_SCHEMA_DEPRECATION ) public Stream<SchemaProcedure.GraphResult> schema() { return schemaVisualization(); }
@Description( "Similar to db.awaitIndex(index, timeout), except instead of an index pattern, the index is specified by name. " + "The name can be quoted by backticks, if necessary." ) @Procedure( name = "db.index.fulltext.awaitIndex", mode = READ ) public void awaitIndex( @Name( "index" ) String index, @Name( value = "timeOutSeconds", defaultValue = "300" ) long timeout ) throws ProcedureException { try ( IndexProcedures indexProcedures = indexProcedures() ) { indexProcedures.awaitIndexByName( index, timeout, TimeUnit.SECONDS ); } }
@Description( "Wait for the updates from recently committed transactions to be applied to any eventually-consistent fulltext indexes." ) @Procedure( name = "db.index.fulltext.awaitEventuallyConsistentIndexRefresh", mode = READ ) public void awaitRefresh() { accessor.awaitRefresh(); }
@Description( "Create a schema index with specified index provider (for example: CALL db.createIndex(\":Person(name)\", \"lucene+native-2.0\")) - " + "YIELD index, providerName, status" ) @Procedure( name = "db.createIndex", mode = SCHEMA ) public Stream<SchemaIndexInfo> createIndex( @Name( "index" ) String index, @Name( "providerName" ) String providerName ) throws ProcedureException { try ( IndexProcedures indexProcedures = indexProcedures() ) { return indexProcedures.createIndex( index, providerName ); } }
@Description( "Visualize the schema of the data. Replaces db.schema." ) @Procedure( name = "db.schema.visualization", mode = READ ) public Stream<SchemaProcedure.GraphResult> schemaVisualization() { return Stream.of( new SchemaProcedure( graphDatabaseAPI, tx ).buildSchemaGraph() ); }
@Description( "Create a label" ) @Procedure( name = "db.createLabel", mode = WRITE ) public void createLabel( @Name( "newLabel" ) String newLabel ) throws IllegalTokenNameException, TooManyLabelsException { tx.tokenWrite().labelGetOrCreateForName( newLabel ); }
@Procedure( name = "db.schema.nodeTypeProperties", mode = Mode.READ ) @Description( "Show the derived property schema of the nodes in tabular form." ) public Stream<NodePropertySchemaInfoResult> nodePropertySchema() { return new SchemaCalculator( tx ).calculateTabularResultStreamForNodes(); }
@Description( "Create a RelationshipType" ) @Procedure( name = "db.createRelationshipType", mode = WRITE ) public void createRelationshipType( @Name( "newRelationshipType" ) String newRelationshipType ) throws IllegalTokenNameException { tx.tokenWrite().relationshipTypeGetOrCreateForName( newRelationshipType ); }
@Procedure( name = "db.schema.relTypeProperties", mode = Mode.READ ) @Description( "Show the derived property schema of the relationships in tabular form." ) public Stream<RelationshipPropertySchemaInfoResult> relationshipPropertySchema() { return new SchemaCalculator( tx ).calculateTabularResultStreamForRels(); }
@Description( "Create a Property" ) @Procedure( name = "db.createProperty", mode = WRITE ) public void createProperty( @Name( "newProperty" ) String newProperty ) throws IllegalTokenNameException { tx.tokenWrite().propertyKeyGetOrCreateForName( newProperty ); }
@Description( "Schedule resampling of all outdated indexes." ) @Procedure( name = "db.resampleOutdatedIndexes", mode = READ ) public void resampleOutdatedIndexes() { try ( IndexProcedures indexProcedures = indexProcedures() ) { indexProcedures.resampleOutdatedIndexes(); } }
@Description( "Wait for all indexes to come online (for example: CALL db.awaitIndexes(\"500\"))." ) @Procedure( name = "db.awaitIndexes", mode = READ ) public void awaitIndexes( @Name( value = "timeOutSeconds", defaultValue = "300" ) long timeout ) { graphDatabaseAPI.schema().awaitIndexesOnline( timeout, TimeUnit.SECONDS ); }
@Admin @Description( "Retrieve the status of all available collector daemons, for this database." ) @Procedure( name = "db.stats.status", mode = Mode.READ ) public Stream<StatusResult> status() { CollectorStateMachine.Status status = dataCollector.queryCollector.status(); return Stream.of( new StatusResult( Sections.QUERIES, status.message, Collections.emptyMap() ) ); }
@Description( "Schedule resampling of an index (for example: CALL db.resampleIndex(\":Person(name)\"))." ) @Procedure( name = "db.resampleIndex", mode = READ ) public void resampleIndex( @Name( "index" ) String index ) throws ProcedureException { try ( IndexProcedures indexProcedures = indexProcedures() ) { indexProcedures.resampleIndex( index ); } }
@Description( "List the available analyzers that the fulltext indexes can be configured with." ) @Procedure( name = "db.index.fulltext.listAvailableAnalyzers", mode = READ ) public Stream<AvailableAnalyzer> listAvailableAnalyzers() { Stream<AnalyzerProvider> stream = accessor.listAvailableAnalyzers(); return stream.flatMap( provider -> { String description = provider.description(); Spliterator<String> spliterator = provider.getKeys().spliterator(); return StreamSupport.stream( spliterator, false ).map( name -> new AvailableAnalyzer( name, description ) ); } ); }
@Description( "Create a unique property constraint with index backed by specified index provider " + "(for example: CALL db.createUniquePropertyConstraint(\":Person(name)\", \"lucene+native-2.0\")) - " + "YIELD index, providerName, status" ) @Procedure( name = "db.createUniquePropertyConstraint", mode = SCHEMA ) public Stream<BuiltInProcedures.SchemaIndexInfo> createUniquePropertyConstraint( @Name( "index" ) String index, @Name( "providerName" ) String providerName ) throws ProcedureException { try ( IndexProcedures indexProcedures = indexProcedures() ) { return indexProcedures.createUniquePropertyConstraint( index, providerName ); } }
@Description( "Show the current user." ) @Procedure( name = "dbms.showCurrentUser", mode = DBMS ) public Stream<UserResult> showCurrentUser() { return Stream.of( userResultForName( securityContext.subject().username() ) ); }