Aliases do not carry proper metadata. by garydgregory · Pull Request #2981 · h2database/h2database · GitHub
Skip to content

Aliases do not carry proper metadata.#2981

Open
garydgregory wants to merge 1 commit into
h2database:masterfrom
garydgregory:alias_bad_param_metadata
Open

Aliases do not carry proper metadata.#2981
garydgregory wants to merge 1 commit into
h2database:masterfrom
garydgregory:alias_bad_param_metadata

Conversation

@garydgregory

Copy link
Copy Markdown

Add a failing test to show that an ALIAS to a Java method does not carry any parameter metadata. Internally the type is unknown which is then mapped to 12 (VARCHAR).

I'm not sure the best way to fix this. I am looking for help from the community here.

any parameter metadata. Internally the type is unknown which is then
mapped to 12 (VARCHAR).
@grandinj

Copy link
Copy Markdown
Contributor

@garydgregory

Copy link
Copy Markdown
Author

Hi all,
I am working on a set of tools and a runtime that rely heavily on metadata using mostly MySQL and DB2 but we also test with H2, MS-SQL Server and Oracle. In fact, initial development and tests is often done using H2 since it is so convenient. We are now implementing some new feature around stored procedures and arrays. I can no longer use H2 for this work. So if H2 has no plans on supporting these JDBC APIs, I'll have to go to one of our main DBMSs.

@katzyn

katzyn commented Dec 17, 2020

Copy link
Copy Markdown
Contributor

Current H2 (compiled from the current sources) provides this information in standard INFORMATION_SCHEMA.ROUTINES, INFORMATION_SCHEMA.PARAMETERS,
INFORMATION_SCHEMA.ELEMENT_TYPES (for arrays) and other tables.

Unfortunately, only some DBMS support SQL/Schemata properly.

@katzyn

katzyn commented Dec 17, 2020

Copy link
Copy Markdown
Contributor

On the other hand, callable statements have only very basic implementation in H2. They are rarely used, so nobody carried about their metadata.

@garydgregory

garydgregory commented Dec 17, 2020

Copy link
Copy Markdown
Author

On the other hand, callable statements have only very basic implementation in H2. They are rarely used, so nobody carried about their metadata.

I think it would be helpful to think about this in the context of JDBC users and not H2 users. In my case, I use H2 as a placeholder for other databases and as a convenience during development. Saying that callable statements are rarely used in H2 might be true (how would you know?), but it is certainly not the case for the JDBC applications I see.

@grandinj

Copy link
Copy Markdown
Contributor

Saying that callable statements are rarely used in H2 might be true (how would you know?), but it is certainly not the case for the JDBC applications I see.

This is entirely a volunteer developed project, with nobody being paid to work on H2. If you don't like it, feel free to use another project or do the necessary work yourself.

@garydgregory

Copy link
Copy Markdown
Author

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.

3 participants