Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.
This repository was 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

@brettatoms

Description

@brettatoms

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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions