Menu

#4 Enumerate Key Generator

open
nobody
None
5
2012-11-28
2005-02-01
pabloj
No

Hi, it would be nice to have an estension of the
NumberGenerator and the StringGenerator to generate
enumerate keys, to cover the case for fields that
should have only a limited number of possible values.
The definition in the schema could be something like:

<generator
type="pl.kernelpanic.dbmonster.misc.EnumStringGenerator">
<enumerated>
<property name="enumValue1" value="true"/>
<property name="enumValue2" value="false"/>
<property name="enumValue3" value="unknown"/>
</enumerated>
<property name="nulls" value="0"/>
</generator>

Thanks in advance.

Discussion

  • Piotr Maj

    Piotr Maj - 2005-02-04

    Logged In: YES
    user_id=72750

    nice idea, scheduled for addition ;)

    --
    Piotr

     
  • Nobody/Anonymous

    Logged In: NO

    This could also be useful for databases that support enum
    datatype (MySQL) or check constraints

     

Log in to post a comment.

MongoDB Logo MongoDB