Generic method to build an entity from postgresql database results, since the postgresql database may not return results.
Generic method to build an entity from postgresql database results, since the postgresql database may not return results.
the type of entity to be built
an optional ResultSet returned from the database
a function that can build entities of type A from a RowData object
a disjunction containing either a RepositoryError.Fail, or an object of type A
Generic method to build a list of entities from postgresql database results, since the postgresql database may not return results.
Generic method to build a list of entities from postgresql database results, since the postgresql database may not return results.
TODO: check in which case the database driver will return "None" instead of Some(ResultSet)
the type of entity to be built
an optional ResultSet returned from the database
a function that can build entities of type A from a RowData object
a disjunction containing either a RepositoryError.Fail, or an object of type A
Create a LongAnswerTask from a row returned by the database.
Create a LongAnswerTask from a row returned by the database.
a RowData object returned from the db.
a LongAnswerTask object
Create a MatchingTask from a row returned by the database.
Create a MatchingTask from a row returned by the database.
a RowData object returned from the db.
a MatchingTask object
Create a MultipleChoiceTask from a row returned by the database.
Create a MultipleChoiceTask from a row returned by the database.
a RowData object returned from the db.
a MultipleChoiceTask object
Create a OrderingTask from a row returned by the database.
Create a OrderingTask from a row returned by the database.
a RowData object returned from the db.
a OrderingTask object
Create a ShortAnswerTask from a row returned by the database.
Create a ShortAnswerTask from a row returned by the database.
a RowData object returned from the db.
a ShortAnswerTask object
Delete all tasks belonging to a part.
Delete all tasks belonging to a part.
the part to delete tasks from.
A boolean indicating whether the operation was successful.
Delete a task.
Delete a task.
The task to delete.
A boolean indicating whether the operation was successful.
Find a task given its position within a part, its part's position within a project, and its project.
Find a task given its position within a part, its part's position within a project, and its project.
the project to search within
the part to get position
the number of the task within its part
an optional task if one was found
Find a single entry by ID.
Find a single entry by ID.
the UUID to search for
an optional task if one was found
Find a task on which user is working on now.
Find a task on which user is working on now.
Find a task from all tasks on which someone is working on now.
Find a task from all tasks on which someone is working on now.
Insert a new task into the database.
Insert a new task into the database.
This method handles all task types in one place.
The task to be inserted
the new task
Find all tasks belonging to a given project.
Find all tasks belonging to a given project.
The project to return parts from.
a vector of the returned tasks
Find all tasks belonging to a given part.
Find all tasks belonging to a given part.
The part to return tasks from.
a vector of the returned tasks
Find all tasks.
Find all tasks.
a vector of the returned tasks
Send a query to the database and retrieve a list of entities.
Send a query to the database and retrieve a list of entities.
Send query to the database and compare the number of rows affected.
Send query to the database and compare the number of rows affected.
Send query to the database and retrieve a single entity.
Send query to the database and retrieve a single entity.
Update a task.
Update a task.
The task to be updated.
the updated task