-
Notifications
You must be signed in to change notification settings - Fork 96
[536] [913] [910] SchemaMigrator/SchemaValidator support for PostgreSQL and CockroachDB #903
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,22 @@ interface Expectation { | |
CompletionStage<Result> select(String sql, Object[] paramValues); | ||
CompletionStage<ResultSet> selectJdbc(String sql, Object[] paramValues); | ||
|
||
/** | ||
* This method is intended to be used only for queries returning | ||
* a ResultSet that must be executed outside of any "current" | ||
* transaction (i.e with autocommit=true). | ||
* <p/> | ||
* For example, it would be appropriate to use this method when | ||
* performing queries on information_schema or system tables in | ||
* order to obtain metadata information about catalogs, schemas, | ||
* tables, etc. | ||
* | ||
* @param sql - the query to execute outside of a transaction | ||
* @param paramValues - a non-null array of parameter values | ||
* @return the CompletionStage<ResultSet> from executing the query. | ||
*/ | ||
CompletionStage<ResultSet> selectJdbcOutsideTransaction(String sql, Object[] paramValues); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you remind us why you need the additional method? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DavideD , since If you look at the corresponding ORM code in GenerationTargetToDatabase, you can see that the statement is created using a connection obtained from a Javadoc for
If you look at the I didn't see any other way to execute a query outside of a transaction that returned a Is there some other method that should be used instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we had this requirement before. I don't see any problem adding a new method. But I mainly wanted a bit of an explanation written somewhere so that others know as well (maybe it wasn't obvious only to me though ;-) At some point, we will need to add some javadoc to that class. Anyway, not something you need to worry about at the moment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I know this stuff is lacking in documentation. I will be adding that. |
||
|
||
CompletionStage<Long> insertAndSelectIdentifier(String sql, Object[] paramValues); | ||
CompletionStage<Long> selectIdentifier(String sql, Object[] paramValues); | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.