Refine search
@Deprecated @Description( "Add a node to an explicit index based on a specified key and value" ) @Procedure( name = "db.index.explicit.addNode", mode = WRITE, deprecatedBy = EXPLICIT_INDEX_DEPRECATION ) public Stream<BooleanResult> nodeManualIndexAdd( @Name( "indexName" ) String explicitIndexName, @Name( "node" ) Node node, @Name( "key" ) String key, @Name( "value" ) Object value ) { graphDatabaseAPI.index().forNodes( explicitIndexName ).add( node, key, value ); // Failures will be expressed as exceptions before the return return Stream.of( new BooleanResult( Boolean.TRUE ) ); }
@Description( "Create a new user." ) @Procedure( name = "dbms.security.createUser", mode = DBMS ) public void createUser( @Name( "username" ) String username, @Name( "password" ) String password, @Name( value = "requirePasswordChange", defaultValue = "true" ) boolean requirePasswordChange ) throws InvalidArgumentsException, IOException { // TODO: Deprecate this and create a new procedure that takes password as a byte[] securityContext.assertCredentialsNotExpired(); userManager.newUser( username, password != null ? UTF8.encode( password ) : null, requirePasswordChange ); }
@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 ); }
@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( "Add a relationship to an explicit index based on a specified key and value" ) @Procedure( name = "db.index.explicit.addRelationship", mode = WRITE, deprecatedBy = EXPLICIT_INDEX_DEPRECATION ) public Stream<BooleanResult> relationshipManualIndexAdd( @Name( "indexName" ) String explicitIndexName, @Name( "relationship" ) Relationship relationship, @Name( "key" ) String key, @Name( "value" ) Object value ) { graphDatabaseAPI.index().forRelationships( explicitIndexName ).add( relationship, key, value ); // Failures will be expressed as exceptions before the return return Stream.of( new BooleanResult( Boolean.TRUE ) ); }
@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( "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( "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( "Create a RelationshipType" ) @Procedure( name = "db.createRelationshipType", mode = WRITE ) public void createRelationshipType( @Name( "newRelationshipType" ) String newRelationshipType ) throws IllegalTokenNameException { tx.tokenWrite().relationshipTypeGetOrCreateForName( newRelationshipType ); }
@Description( "Create a label" ) @Procedure( name = "db.createLabel", mode = WRITE ) public void createLabel( @Name( "newLabel" ) String newLabel ) throws IllegalTokenNameException, TooManyLabelsException { tx.tokenWrite().labelGetOrCreateForName( newLabel ); }