Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

SC-880 - Getting issue details... STATUS


Overview

As part of user search result enhancements, we will require user to be able to filter based on user-type.

For that, we need a way to fetch the available user-types.


Approach 1

Create a look-up table within database, and return it from there.

Pros:

  • Systematic proper approach for persistence of look-up
  • Additional values don't require code-changes.

Cons

  • Will result in unnecessary I/O calls for pretty limited data.
  • It will extend database design without much advantage.
  • As such we are using Cassandra - and such table is useful if we can apply foreign key constraints at database level.


Approach 2 (Preferred)

Use hard-coded values from existing enumeration created for the purpose

Pros:

  • DB storage not required
  • Easy to implement.

Cons:

  • Enumerated values are stored within code, so additional value requires code-change

Given the simplicity of the data, and no forseen future requirements to maintain it as a seperate entity, we propose to use Approach 2.


API Definition

GET /v1/usertype/read/list
Response: 200 OK

[ "TEACHER", "OTHER"]

  • No labels