SetBuilder
set_
¶
set_(*target: Retriever | int) -> SetBuilder
Set this value using another value
Parameters:
-
*target
(Retriever | int
, default:()
) –The retriever path to set the value at. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
SetBuilder
–A
SetBuilder
instance to continue defining additional combinator properties
SetBuilder
¶
Constructs combinators to set retriever values
by
¶
by(from_: Get) -> Combinator
Set the previously selected value to the result after performing the manipulations from the provided Get
instance
Parameters:
-
*from_
(Get
) –The
Get
instance that encodes the manipulations to perform
Returns:
-
Combinator
–A combinator that encodes the setter logic defined by the
SetBuilder
chain
from_
¶
from_(*source: Retriever | int) -> Combinator
Set the previously selected value to the value of this retriever
Parameters:
-
*source
(Retriever | int
, default:()
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
Combinator
–A combinator that encodes the setter logic defined by the
SetBuilder
chain
from_len
¶
from_len(*source: Retriever | int) -> Combinator
Set the previously selected value to the length of this value if it is a list
Parameters:
-
*source
(Retriever | int
, default:()
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
Combinator
–A combinator that encodes the setter logic defined by the
SetBuilder
chain
Raises:
-
ValueError
–if the source value is not a list
to
¶
to(val: Any) -> Combinator
Set the previously selected value to this literal value
Parameters:
-
val
(Any
) –The literal value
Returns:
-
Combinator
–A combinator that encodes the setter logic defined by the
SetBuilder
chain