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

Update JDBC docs for V2 #3071

Merged
merged 16 commits into from
Jan 23, 2025
Merged

Update JDBC docs for V2 #3071

merged 16 commits into from
Jan 23, 2025

Conversation

Paultagoras
Copy link
Contributor

@Paultagoras Paultagoras commented Jan 13, 2025

Summary

Added docs to support the V2 version (while keeping the V1 version of the docs)

Closes ClickHouse/clickhouse-java#1480

Checklist

@Paultagoras Paultagoras self-assigned this Jan 13, 2025
@Paultagoras Paultagoras requested a review from a team as a code owner January 13, 2025 08:42
@Paultagoras Paultagoras removed the request for review from a team January 13, 2025 08:42
@Paultagoras Paultagoras changed the title Update jdbc-driver.md Update JDBC docs for V2 Jan 13, 2025
Copy link
Member

@mshustov mshustov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It's discussable. Personally, I don't think we need to create another separate entry in the docs, as JDBC v2 is an internal name. For the end user it's the same driver with some behavioural changes from version 0.8.0.
  2. I didn't find a list of changes and unsupported features in JDBC starting from 0.8.0 (Transactions, for example), which is important to highlight. It's not necessarily to follow the same format, but you can see how it was done in the same JDBC driver previously https://github.com/ClickHouse/clickhouse-java/tree/v0.4.0/clickhouse-jdbc#upgrade-to-032

@laeg
Copy link
Contributor

laeg commented Jan 13, 2025

  1. It's discussable. Personally, I don't think we need to create another separate entry in the docs, as JDBC v2 is an internal name. For the end user it's the same driver with some behavioural changes from version 0.8.0.

The tricky part here is the difference between a SaaS product (always showing latest rather than maintaining state) and traditional SW documentation.

But I agree with this sentiment, it also might be worth us exploring at this point how do we do "versioning" of the documentation rather than having "extra pages" - like having a version drop down and corresponding version in the URL.

Maybe we need to consider something like having JavaDocs being the "source of truth" of functionality?

At least one of the immediate things we should do is treat the sidebar as the "ideal customer journey" rather than an index. We can link in the main doc to the v1 documentation until it's deprecated.

  1. I didn't find a list of changes and unsupported features in JDBC starting from 0.8.0 (Transactions, for example), which is important to highlight. It's not necessarily to follow the same format, but you can see how it was done in the same JDBC driver previously https://github.com/ClickHouse/clickhouse-java/tree/v0.4.0/clickhouse-jdbc#upgrade-to-032

I think rather than listing out all unsupported features, it would be more beneficial for a user to have a "migration guide" that has this information in and alternatives to achieving similar functionality if applicable.

@Paultagoras Paultagoras marked this pull request as draft January 13, 2025 16:51
@chernser
Copy link
Contributor

@mshustov I think separating documents is good because:

  • less confusion because information is separated by version and it is clear what should work in v2, v1
  • when jdbc v1 is deprecated - we can remove v1 doc easily and revert as needed
  • visit statistics.

@Paultagoras Paultagoras marked this pull request as ready for review January 20, 2025 08:14
@Paultagoras Paultagoras requested a review from mshustov January 20, 2025 08:18

## More Information
For more information, see our [GitHub repository](https://github.com/ClickHouse/clickhouse-java) and [Client-V2 documentation](/docs/en/integrations/language-clients/java/client-v2.md).
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a few issues with docs label. should we address them from the very beginning? https://github.com/ClickHouse/clickhouse-java/issues?q=is%3Aissue%20state%3Aopen%20label%3Adocs%20label%3Ajdbc-v2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can do it a in follow-up

sidebar_label: JDBC V2
sidebar_position: 4
keywords: [clickhouse, java, jdbc, driver, integrate]
description: ClickHouse JDBC driver V2
Copy link
Member

@mshustov mshustov Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I agree with this sentiment, it also might be worth us exploring at this point how do we do "versioning" of the documentation rather than having "extra pages" - like having a version drop down and corresponding version in the URL.

@laeg What about using the client versioning? There will be 2 pages:

  1. description: ClickHouse JDBC driver > v0.8.x (or ClickHouse JDBC driver latest)
  2. description: ClickHouse JDBC driver v0.7.x

We can manually add more pages if necessary and they always transparently mapped to JDBC release version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i would prefer if we aligned it more to release versions rather than internal code versions.

did we look into whether we could do something more elegant for versioning the docs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did we look into whether we could do something more elegant for versioning the docs?

I didn't manage to find a solution in 30min.

| Named Parameters | Not part of the JDBC spec |
| Stream-based PreparedStatements | Early version of the driver allowed for non-jdbc usage of PreparedStatements - if you desire such options, we recommend looking at [Client-V2](/docs/en/integrations/language-clients/java/client-v2.md) and its [examples](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2). |

### Handling Dates, Times, and Timezones
Copy link
Member

@mshustov mshustov Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ to this section.
A minor ask: could you move it to Supported data types section?

Copy link
Member

@mshustov mshustov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the last thing, I'd like to sort out is versioning in https://github.com/ClickHouse/clickhouse-docs/pull/3071/files#r1925045569

and (minor)moving data/time concerns to Supported types section

@laeg
Copy link
Contributor

laeg commented Jan 23, 2025

adding my comment again:

At least one of the immediate things we should do is treat the sidebar as the "ideal customer journey" rather than an index. We can link in the "v2" doc to the "v1" documentation until it's deprecated.

we can do the same for java v1 & v2 documentation

@mshustov
Copy link
Member

At least one of the immediate things we should do is treat the sidebar as the "ideal customer journey" rather than an index. We can link in the "v2" doc to the "v1" documentation until it's deprecated.

so you want something like this?

2025-01-23_17-40-42

@Paultagoras Paultagoras merged commit 65768de into main Jan 23, 2025
5 checks passed
@Paultagoras Paultagoras deleted the update-jdbc-docs branch January 23, 2025 18:38
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

Successfully merging this pull request may close these issues.

Add example with Hikari
4 participants