Package ai.chalk.models
Class OnlineQueryParams.SingleRowInput
java.lang.Object
ai.chalk.models.OnlineQueryParams.SingleRowInput
- Enclosing class:
- OnlineQueryParams
Helper class for building input data for single-row online queries.
Provides a more convenient way to add input values for single-row queries
without needing to wrap each value in List.of() or Arrays.asList().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a has-many input: a list of child rows (each row a Map of column FQN to value) for a single-row query.final <T> OnlineQueryParams.SingleRowInputAdd a value to the row using a typed Feature.Add a value to the row using a feature fully qualified name (FQN).withInputs(Map<String, Object> inputs) Add multiple values to the row using a map of feature FQNs to values.
-
Constructor Details
-
SingleRowInput
public SingleRowInput()Create a new SingleRowInput builder.
-
-
Method Details
-
withInput
Add a value to the row using a typed Feature.- Parameters:
feature- The feature to add a value forvalue- The value for this feature- Returns:
- This SingleRowInput for method chaining
-
withInput
Add a value to the row using a feature fully qualified name (FQN).- Parameters:
featureFqn- The fully qualified name of the featurevalue- The value for this feature- Returns:
- This SingleRowInput for method chaining
-
withInputs
Add multiple values to the row using a map of feature FQNs to values.- Parameters:
inputs- Map of feature FQNs to their values- Returns:
- This SingleRowInput for method chaining
-
withHasManyInput
public final OnlineQueryParams.SingleRowInput withHasManyInput(String featureFqn, List<Map<String, Object>> rows) Add a has-many input: a list of child rows (each row a Map of column FQN to value) for a single-row query. The child rows represent the has-many relationship data.- Parameters:
featureFqn- The fully qualified name of the has-many feature (e.g. "user.transactions")rows- The list of child row maps- Returns:
- This SingleRowInput for method chaining
-