Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Issue: resolves #2174
Implementation:
Step 1: Modify the
listTableColumns
method to return columns in table column orderIn the
BasicDatabaseClient
class, modify thelistTableColumns
method to return the columns in the order they appear in the table. This might involve changing the SQL query used to retrieve the columns or sorting the columns after they are retrieved. Make sure to check the function definition in other subclasses as well, as the behavior of thelistTableColumns
method might be different in different subclasses.Step 2: Modify the
buildInsertQuery
function to generate SQL in table column orderModify the
buildInsertQuery
function to generate the SQL insert query in the order of the columns passed to the function. Since thelistTableColumns
method has been modified to return the columns in table column order, thebuildInsertQuery
function should now generate the SQL insert query in table column order.Step 3: Update the
getInsertQueryTests
inrunCommonTests
to test the fixUpdate the
getInsertQueryTests
inrunCommonTests
to test if the SQL query generated bygetInsertQuery
is in table column order. This might involve modifying the expected SQL queries in the test to be in table column order and checking if the actual SQL query generated bygetInsertQuery
matches the expected query.Report:
Modify the
No resultlistTableColumns
method to return columns in table column orderModify the
No resultbuildInsertQuery
function to generate SQL in table column orderUpdate the
No resultgetInsertQueryTests
inrunCommonTests
to test the fixSomething look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #2174. Then, try again. For more information, check the documentation.