Value Lists with Fixed Values

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:

IDTABLE_SCHEMATABLE_NAMECOLUMN_NAMEEVENT_NAMEHANDLER_SCHEMAHANDLER_NAMEHANDLER_TYPEHANDLER_CODE
 xlsobjectsTABLE_TYPEValidationListVALUESTABLE, 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>

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.