Querying the Datastore (Part II)
Part II was going to be about how to write Datastore queries and set up indexes, but that was becoming a rather massive and repetitive post no one really needs; the documentation may be murky on what queries are allowed but reasonably accessible on how. Instead this is going to be a post about the queries needed for each component of the application, which determine the properties of each Datastore kind.
These are the screens that make up the application (from our paper prototype):
Homepage *Retrieve the 10 highest count of documents transcribed by each Scriber [to display as the leader board].
Scriber's Dashboard Screen *For the current user (a Scriber), retrieve his/her score [to display as badges/warnings]. *For the current user (a Scriber), retrieve Projects that he/she worked on and are finished [to display on "trophies"]. *For the current user (a Scriber), retrieve Projects that he/she worked on and are ongoing. *For the current user (a Scriber), retrieve Projects that he/she would be interested in and are newly added. *For the current user (a Scriber), retrieve Projects that he/she would be interested in and are under-transcribed. *Retrieve all other Projects, under-transcribed to not.
Scriber's Transcribing Screen *For the selected Project, retrieve 20 documents that have fields that haven't been verified. *(If the Scriber opts for a random project, select the Project that is most under-transcribed.) *Create Transcription.
Scriber's Congrats Screen *Perform validation. Update Project's progress. Update Scriber's score.
Journalist's Dashboard Screen *For the current user (a Journalist), retrieve Project he/she set up, ongoing to finished, new to old [searchable].
Journalist's Project Monitor Screen *For the current user (a Journalist) and the selected Project, retrieve validated Transcriptions *If the Journalist decides to shut down the Project, set finished=True & delete all related Transcriptions.
Journalist's Upload Screen Journalist's Descriptions Screen Journalist's Field Selection Screen Journalist's Congrats Screen *Create Project.













