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

SNOW-802270: SessionBuilder should use the builder pattern #24

Open
sfc-gh-jfreeberg opened this issue Apr 13, 2023 · 0 comments
Open
Labels
P3 Low priority issue

Comments

@sfc-gh-jfreeberg
Copy link
Collaborator

We got some feedback that that the pattern of passing a Map<String, String> is not best practice. Let's update the Builder class to support the following:

Java

Session session = Session.builder()
    .url("myaccount.snowflakecomputing.com")
    .user("myusername")
    .password(myPassword)
    .role("admin")
    .warehouse("my_wh")
    .database("my_db")
    .schema("my_schema")
    .create()

Scala

val session = Session.builder
    .url("myaccount.snowflakecomputing.com")
    .user("myusername")
    .password(myPassword)
    .role("admin")
    .warehouse("my_wh")
    .database("my_db")
    .schema("my_schema")
    .create

This is tangentially related to #1

Open questions:

  • Should we support a shortened alias for .database(), called .db()?
@github-actions github-actions bot changed the title SessionBuilder should use the builder pattern SNOW-802270: SessionBuilder should use the builder pattern Apr 26, 2023
@sfc-gh-jfreeberg sfc-gh-jfreeberg added the P3 Low priority issue label Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority issue
Projects
None yet
Development

No branches or pull requests

1 participant