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
Instantiate a Document given a row result from the database.
Instantiate a Document given a row result from the database. Must be provided with the owner and users.
Find an individual document.
Find an individual document.
Optional, if not indicated, the latest revision will be found. Otherwise, will return computed Delta starting from first version till indicated one.
Create a new empty document.
Create a new empty document.
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 an existing document.
Update an existing document.
Do not call this function to update the document's delta unless you know what you're doing! The delta field stores exactly that... a snapshot of the latest document text. That snapshot should be constructed from the revision history stored in the revisions table.