Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
jvx:server:storage:dbcheck_constraints [2018/02/02 10:33]
admin created
jvx:server:storage:dbcheck_constraints [2020/06/29 13:32] (current)
cduncan
Line 1: Line 1:
-~~NOTRANS~~ +~~Title: Considering Check Constraints ​From the Database~~
-~~Title: Considering Check Constraints ​from the Database~~+
  
-In addition to the use of [[jvx:​server:​storage:​dbdefault_values|Default Values]] the restriction to **"​allowed values"​** is another advantage of JVx.+In addition to the use of [[jvx:​server:​storage:​dbdefault_values|default values]]the restriction to **"​allowed values"​** is another advantage of JVx.
  
-The "​allowed values"​for columns are usually defined in the database using check constraints. These are evaluated by JVx and assumed as so called ​allowed values.+The "​allowed values"​ for columns are usually defined in the database using check constraints. These are evaluated by JVx and assumed as allowed values.
  
-The constraints directly impact the user interface, as the user is only offered the allowed values in the form of Choice Cell Editors.+The constraints directly impact the user interface, as the user is only offered the allowed values in the form of choice cell editors.
  
 == Example == == Example ==
  
-Based on the example for [[jvx:​server:​storage:​dbdefault_values|Default Values]], we define the following check constraints (Oracle Syntax):+Based on the example for [[jvx:​server:​storage:​dbdefault_values|default values]], we define the following check constraints (Oracle Syntax):
  
-<java sql>+<file sql>
 alter table USERS alter table USERS
   add constraint USER_ACTIVE_CHECK   add constraint USER_ACTIVE_CHECK
Line 22: Line 21:
 </​file>​ </​file>​
  
-Therefore the fields "​ACTIVE"​ and "​CHANGE_PASSWORD"​ can only contain "​Y"​ or "​N"​.+Thereforethe fields "​ACTIVE"​ and "​CHANGE_PASSWORD"​ can only contain "​Y"​ or "​N"​.
  
-So that in the user interface the correct ​Choice Cell Editor ​is used, this must be defined. This is done globally by calling:+So that in the user interface the correct ​choice cell editor ​is used, this must be defined. This is done globally by calling:
  
 <file java> <file java>
Line 30: Line 29:
 </​file>​ </​file>​
  
-Choice Cell Editor ​from the ApplicationUtil has already defined ​for the values "​Y"​ and "​N"​.+choice cell editor ​from the ApplicationUtil has already defined the values "​Y"​ and "​N"​.
  
 The following methods can be used to disable the check constraints detection: The following methods can be used to disable the check constraints detection:
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information