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

Provide ability to return all columns using RETURNING (eg RETURNING *) [CORE3808] #4151

Closed
firebird-automations opened this issue Apr 4, 2012 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @mrotteveel

Block progress on JDBC570

Currently when using INSERT ... RETURNING, UPDATE ... RETURNING, DELETE ... RETURNING one needs to explicitly specify the columns to be returned. It would be great if this could be extended to return all columns, eg by specifying RETURNING * (similar to what PostgreSQL has: http://www.postgresql.org/docs/current/static/sql-insert.html ).

Rationale for this:
The JDBC specification provides for functionality to automatically retrieve generated keys for statements (see http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#executeUpdate(java.lang.String,%20int) ). As it is impossible to find out which column(s) are auto-generated in Firebird, Jaybird 2.2 will simply return all columns of a table. However, to be able to do that I need to query the table metadata which adds additional overhead (eg server roundtrips).

Being able to simply specify RETURNING * would cut out that overhead and would simplify the driver side.

Commits: 558c691 21ca22f

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 1 [ 10750 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

Adriano, thanks! A quick test shows it works. I hope to integrate it into Jaybird later this week.

@firebird-automations
Copy link
Collaborator Author

Modified by: @mrotteveel

Link: This issue block progress on JDBC570 [ JDBC570 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

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

No branches or pull requests

2 participants