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

LibreOfficeBase ResultSet metadata issues #202

Merged
merged 2 commits into from
Aug 7, 2019

Conversation

nicktorwald
Copy link

Implement several ResultSetMetaData methods to be able be run as a
proper JDBC-driver inside Base tool.

Reworked SQL data types in relation with Tarantool NoSQL types as well
as JDBC types. A data conversations are left out of this commit.

This commit also addresses to tarantool/tarantool#3292 to be executed
in a dry-run mode. LibreOffice Base uses PreparedStatement.getMetadata()
without a real query execution to extract a metadata in advance. This
causes NPE in #198.

Follows on: #198

@coveralls
Copy link

coveralls commented Jun 27, 2019

Coverage Status

Coverage increased (+2.5%) to 74.783% when pulling 05ce89d on nicktorwald/gh-198-libre-office-npe into b53e0ba on master.

@nicktorwald
Copy link
Author

Actually, this PR cannot fix NPE issue from #198 because of lack of dry-run mode.

I tested it with a real query execution in PreparedStatement.getMetaData(). When I overcame this NPE I faced several extra issues related to unimplemented ResultSetMetaData methods. As a result, I implemented a few of them to work properly in Base environment. But some of those methods are also blocked by Tarantool DB, I assume, such as nullability flag, auto-increment flag, and, possibly, column name/aliases.

@nicktorwald nicktorwald force-pushed the nicktorwald/gh-198-libre-office-npe branch 2 times, most recently from 9fb739b to 05ce89d Compare July 18, 2019 18:01
@Totktonada
Copy link
Member

<...> blocked by Tarantool DB, I assume, such as nullability flag, auto-increment flag, and, possibly, column name/aliases.

They are available (except aliases) via 'information schema': _vspace view — if I get you right. Don't sure however whether it is possible to match it against a query metadata in a general case. So we need to understand our needs, look around other DBMS protocols / APIs and propose a change for tarantool (file an issue).

Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

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

LGTM in general. Just several minor comments.

Implement several ResultSetMetaData methods to be able be run as a
proper JDBC-driver inside Base tool.

Reworked SQL data types in relation with Tarantool NoSQL types as well
as JDBC types. A data conversations are left out of this commit.

This issue also addresses to tarantool/tarantool#3292 to be executed
in a dry-run mode. LibreOffice Base uses PreparedStatement.getMetadata()
without a real query execution to extract a metadata in advance. This
causes NPE in #198.

Follows on: #198
Now, CONNECTED_PATTERN has become multi lined that allows the console to
skip extra lines before the connected one (for instance, warning lines).
Also unexpected 'enter' command was removed which produced errors in
the output.
@nicktorwald nicktorwald force-pushed the nicktorwald/gh-198-libre-office-npe branch from 05ce89d to 7f08fb6 Compare August 6, 2019 17:01
@nicktorwald nicktorwald merged commit bc5946e into master Aug 7, 2019
@nicktorwald nicktorwald deleted the nicktorwald/gh-198-libre-office-npe branch August 7, 2019 15:34
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