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

feat(sql): preserve column order from query with indexmap #1305

Merged
merged 3 commits into from May 15, 2024

Conversation

thewh1teagle
Copy link
Contributor

When using the select command in the sql plugin, the field order in each row isn't maintained due to the use of a hashmap. This update ensures that the field order remains consistent.

Example:

SELECT name, age FROM users;

Previously, the returned rows could have inconsistent order, such as

{"name": ..., "age": ...}

or

{"age": ..., "name": ...}

With this modification, the order will consistently follow the query, i.e., name followed by age.

@thewh1teagle thewh1teagle requested a review from a team as a code owner May 10, 2024 16:00
@thewh1teagle thewh1teagle changed the title feat: preserve column order from query with indexmap feat(sql): preserve column order from query with indexmap May 10, 2024
@FabianLars
Copy link
Member

Thanks for contributing! can you also add a changefile in .changes/ please?

@thewh1teagle
Copy link
Contributor Author

Sure, added new changes file

@FabianLars FabianLars merged commit a940ef6 into tauri-apps:v2 May 15, 2024
14 checks passed
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.

None yet

2 participants