ca.shiftfocus.krispii.core.repositories
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
Delete a component scratchpad.
Delete a component scratchpad.
Find a single entry by ID.
Find a single entry by ID.
an optional RowData object containing the results
Insert a new ComponentScratchpad.
Insert a new ComponentScratchpad. Used to create new scratchpads, and to insert new revisions to existing pads. Note that the primary key comprises the user's ID, the task's ID, and the revision number, so each revision is a separate entry in the database.
the ComponentScratchpad object to be inserted.
the newly created ComponentScratchpad
Select rows by their task ID.
Select rows by their task ID.
the 128-bit UUID, as a byte array, to search for.
an optional RowData object containing the results
Select rows by their user ID.
Select rows by their user ID.
the 128-bit UUID, as a byte array, to search for.
an optional RowData object containing the results
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 ComponentScratchpad revision.
Update an existing ComponentScratchpad revision. This always updates a specific revision, since the primary key comprises user ID, task ID, and revision number. Each revision has its own versioning w.r.t. optimistic offline lock.
the ComponentScratchpad object to be inserted.
the newly created ComponentScratchpad