Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No setter for Constraints in Field class? #80

Open
vincentmarinelli-wk opened this issue May 23, 2023 · 1 comment
Open

No setter for Constraints in Field class? #80

vincentmarinelli-wk opened this issue May 23, 2023 · 1 comment

Comments

@vincentmarinelli-wk
Copy link
Contributor

Overview

(@iSnow @JohannesJander ) I'm wondering why there is a getter but no setter for Constraints in the Field abstract class:

public Map<String, Object> getConstraints(){

Is there another way that we should be setting field-level constraints when creating a schema in Java code?

If this is an oversight, I'd be happy to create a PR to add the setter.


Please preserve this line to notify @iSnow (lead of this repository)

@iSnow
Copy link
Contributor

iSnow commented Sep 5, 2023

@vincentmarinelli-wk the constraints are parameters in the constructor.

Usually, the idea is that client code wouldn't directly manipulate Fields, but they would be created from the CSV and Schema, and so the constraints would be declared in the Schema.

What specific use-case do you have that needs programmatic setting of constraints on Fields?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants