ecl-logo Documentation

FieldP

FieldP[]pattern

returns a pattern which matches a field of any defined type.

FieldP[type]pattern

returns a pattern which matches a field of the defined type.

FieldP[Object]pattern

returns a pattern which matches a field of any Object type.

FieldP[Model]pattern

returns a pattern which matches a field of any Model type.

Details

    Input
    Output
    General Options

Examples

Basic Examples  (4)

Returns a pattern which matches an Object/Model field in any defined type:

Returns a pattern that matches any field in the defined Model type:

Returns a pattern that does not match a type that is not defined:

Returns a pattern that matches an indexed field in a given Object type:

Additional Examples  (6)

Does not evaluate if not given an expression in the form of an Object/Model type:

Returns a pattern that matches any fields of any defined Model types:

Returns a pattern that does not match any Object fields, only Model fields:

Returns a pattern that matches any fields of any defined Object types:

Returns a pattern that matches any fields in any of the given types:

Returns a pattern that does not match any Model fields, only Object fields:

Options  (2)

Output  (2)

Output -> Short matches only against field symbols and not fully qualified fields:

Output -> Short will match a symbol as long as it is a field in the given type: