Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[falcor] migrate character -> genes to neo4j #30

Open
joshdmiller opened this issue Sep 17, 2016 · 0 comments
Open

[falcor] migrate character -> genes to neo4j #30

joshdmiller opened this issue Sep 17, 2016 · 0 comments

Comments

@joshdmiller
Copy link

joshdmiller commented Sep 17, 2016

Overview

Migrate falcor routes pertaining to character genes to get the database relationships using Neo4j.

Specs

Character genes will no longer come from MongoDB. Their association to characters and other genes as well as their details will be stored in Neo4j.

Character Genes Length

The current length of character genes comes from the length of the array in the mongo document. Instead, this should come from the set of non-archived (see #12 and #11) HAS relationships from this character to a gene, ordered by their creation date.

Character Genes By Index

The current means of fetching individual genes is by their index position in the array. This array should become the ordered set of character genes that follow the above logic.

The value at the index should no longer be an atom, but a reference to genesById[id: string].

Altering character genes is currently accomplished by altering the indexed item in the array. Instead, this should alter the gene in neo by its ID.

Push Character Gene

Character genes are created by pushing to the array in mongo. Instead, the entire relationship will be tracked in neo with no mongo equivalent:

(:Character)-[:HAS {HasProps}]->(:Gene {GeneProps})

With the following properties:

type HasProps = {
  created_at: timestamp,
  creator: string, // id of currently-authenticated user
};

type GeneProps = {
  _id: string,
  gene: string,
  allele: string,
};
@joshdmiller joshdmiller changed the title [wip] migrate character -> genes to neo4j [falcor] migrate character -> genes to neo4j Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant