Value Lists with Fixed Values

Value Lists with Fixed Values

You can use define fixed value lists for parameter values, validation lists, and selection lists.

Here is a sample configuration in the xls.handlers table:

IDTABLE_SCHEMATABLE_NAMECOLUMN_NAMEEVENT_NAMEHANDLER_SCHEMAHANDLER_NAMEHANDLER_TYPEHANDLER_CODE
 xlsobjectsTABLE_TYPEValidationListVALUESTABLE, VIEW, PROCEDURE, CODE, HTTP, TEXT, HIDDEN

The list can use the comma or semicolon as a separator. The comma is preferable.

The values must not contain commas or semicolons. Use other ways to define lists if such characters are required.

Add an empty value first to have it in a list.

DBGate includes 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.

For 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>