Skip to content

Added firebird database type and parser module#33773

Merged
strongduanmu merged 2 commits intoapache:masterfrom
red-soft-ru:shardingsphere-firebird
Nov 24, 2024
Merged

Added firebird database type and parser module#33773
strongduanmu merged 2 commits intoapache:masterfrom
red-soft-ru:shardingsphere-firebird

Conversation

@TedCraft
Copy link
Contributor

@TedCraft TedCraft commented Nov 23, 2024

Fixes #33699.

Changes proposed in this pull request:

  • Added Firebird related database type
  • Added Firebird related parser module
  • Added corresponding tests for Firebird database type and parser module

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

TedCraft and others added 2 commits November 23, 2024 19:30
Co-authored-by: vasilevskyy <marvo.rate2016@yandex.ru>
@TedCraft TedCraft changed the title Add firebird datatype type and parser module Added firebird datatype type and parser module Nov 24, 2024
@TedCraft TedCraft changed the title Added firebird datatype type and parser module Added firebird database type and parser module Nov 24, 2024
@terrymanu
Copy link
Member

Great job, I will review soon.

Copy link
Member

@strongduanmu strongduanmu left a comment

Choose a reason for hiding this comment

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

Looks so great, merged.

@strongduanmu strongduanmu merged commit f72ebcb into apache:master Nov 24, 2024
@TedCraft TedCraft deleted the shardingsphere-firebird branch November 24, 2024 22:39
Comment on lines +35 to +39
@Override
public ConnectionProperties parse(final String url, final String username, final String catalog) {
JdbcUrl jdbcUrl = new StandardJdbcUrlParser().parse(url);
return new StandardConnectionProperties(jdbcUrl.getHostname(), jdbcUrl.getPort(DEFAULT_PORT), jdbcUrl.getDatabase(), null, jdbcUrl.getQueryProperties(), new Properties());
}
Copy link
Member

Choose a reason for hiding this comment

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

[ERROR] 2025-01-11 10:20:35.235 [main] com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Exception during pool initialization.
org.apache.shardingsphere.infra.database.core.exception.UnrecognizedDatabaseURLException: The URL `jdbc:firebird://localhost:32783//var/lib/firebird/data/demo_ds_2.fdb` is not recognized, please refer to the pattern `(?<schema>[\w-.+:%%]+)\s*(?://(?<authority>[^/?#]*))?\s*(?:/(?!\s*/)(?<path>[^?#]*))?(?:\?(?!\s*\?)(?<query>[^#]*))?`.
	at org.apache.shardingsphere.infra.database.core.connector.url.StandardJdbcUrlParser.lambda$parse$0(StandardJdbcUrlParser.java:58)
	at org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:44)
	at org.apache.shardingsphere.infra.database.core.connector.url.StandardJdbcUrlParser.parse(StandardJdbcUrlParser.java:58)
	at org.apache.shardingsphere.infra.database.firebird.connector.FirebirdConnectionPropertiesParser.parse(FirebirdConnectionPropertiesParser.java:37)

Copy link
Member

Choose a reason for hiding this comment

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

I made further changes in #34307.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal to Integrate Firebird Support into Apache ShardingSphere

4 participants