Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Add a str column to all resources to cache __str__ calls #5

Open
brettatoms opened this issue Aug 14, 2013 · 0 comments
Open

Add a str column to all resources to cache __str__ calls #5

brettatoms opened this issue Aug 14, 2013 · 0 comments
Assignees
Milestone

Comments

@brettatoms
Copy link
Member

We should be able to setup an onsave/update trigger so that every time a resource/table is saved it should store its str representation in a str column. This would allow us to query against the str form of a resource.

Things to consider:

  1. Might need more than one str type column to represent things like taxa with author names and potentially markup in a string.
  2. Can we be reasonably sure that a str field value and it's str method always produce the same thing. I think so as long as the records are manipilated via the ORM.
  3. The str method should probably just return the cached str field value in most cases unless specifically asked to rebuild it.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant