Value Lists with Fixed Values
You can define fixed value lists for parameter values, validation lists, and selection lists.
Here's a sample configuration from the xls.handlers table:
ID | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | EVENT_NAME | HANDLER_SCHEMA | HANDLER_NAME | HANDLER_TYPE | HANDLER_CODE |
---|---|---|---|---|---|---|---|---|
xls | objects | TABLE_TYPE | ValidationList | VALUES | TABLE, VIEW, PROCEDURE, CODE, HTTP, TEXT, HIDDEN |
You can use either commas or semicolons as separators, but commas are preferred.
Ensure that the values do not contain commas or semicolons. If you need to include such characters, consider alternative ways to define your lists.
To include an empty value at the start of the list, simply add it first.
DBGate incorporates the fixed values into the VALUES
property of the column metadata. For example:
"VALUES":["TABLE","VIEW","PROCEDURE","CODE","HTTP","TEXT","HIDDEN"]
ODataDB publishes validation lists with fixed values as EnumTypes. Here's an example:
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="xls"> <EnumType Name="objects_table_type"> <Member Name="TABLE"/> <Member Name="VIEW"/> <Member Name="PROCEDURE"/> <Member Name="CODE"/> <Member Name="HTTP"/> <Member Name="TEXT"/> <Member Name="HIDDEN"/> </EnumType> <EntityType Name="objects"> ... <Property Name="PROCEDURE_TYPE" Type="Edm.Object"> <Annotation Term="ODataDB.ValueList" Path="xls.objects_procedure_type"/> </Property> ... </EntityType> </Schema>