Neo4jReactionRepository

core.repositories.Neo4jReactionRepository
class Neo4jReactionRepository[F[_]](client: HttpClient[F])(implicit evidence$1: Sync[F]) extends ReactionRepository[F]

ADDITIONAL MODULE

Neo4jReactionRepository provides a direct interface to the Chemist Pre-processor for managing reactions. This implementation bypasses any caching or additional service logic, directly interacting with the Neo4j-backed Chemist service through HTTP requests.

Value parameters

client

The HttpClient used to communicate with the Chemist service.

Attributes

Source
Neo4jReactionRepository.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def create(reaction: Reaction): F[Either[ReactionError, Reaction]]

Creates a new reaction in the Chemist Pre-processor.

Creates a new reaction in the Chemist Pre-processor.

Value parameters

reaction

The Reaction object to be created.

Attributes

Returns

An F-wrapped Either with ReactionError on the left in case of a failure, or the created Reaction on the right if successful.

Source
Neo4jReactionRepository.scala
def delete(id: Int): F[Boolean]

Deletes a reaction by ID from the Chemist Pre-processor.

Deletes a reaction by ID from the Chemist Pre-processor.

Value parameters

id

The ID of the reaction to delete.

Attributes

Returns

An F-wrapped Boolean. Returns true if deletion is successful, false otherwise.

Source
Neo4jReactionRepository.scala
def get(id: ReactionId): F[Option[Reaction]]

Fetches a reaction by ID from the Chemist Pre-processor.

Fetches a reaction by ID from the Chemist Pre-processor.

Value parameters

id

The ReactionId of the reaction to fetch.

Attributes

Returns

An F-wrapped Option of Reaction. If the reaction is found, it returns Some(Reaction), otherwise None.

Source
Neo4jReactionRepository.scala
def update(id: Int, reaction: Reaction): F[Option[Reaction]]

Updates an existing reaction by ID in the Chemist Pre-processor.

Updates an existing reaction by ID in the Chemist Pre-processor.

Value parameters

id

The ID of the reaction to update.

reaction

The updated Reaction object.

Attributes

Returns

An F-wrapped Option of Reaction. Returns Some(updatedReaction) if successful, otherwise None if the reaction does not exist or update fails.

Source
Neo4jReactionRepository.scala