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

Add @NativeQuery annotation as alias for @Query(nativeQuery=true) #3155

Closed
mp911de opened this issue Sep 12, 2023 · 2 comments
Closed

Add @NativeQuery annotation as alias for @Query(nativeQuery=true) #3155

mp911de opened this issue Sep 12, 2023 · 2 comments
Labels
type: enhancement A general enhancement

Comments

@mp911de
Copy link
Member

mp911de commented Sep 12, 2023

The intent is to create a place where we can specify strategies to rewrite SQL queries. Right now, JSQLParser is used when it is there and we fall back to regex if it isn't there. We want to create a place where we could specify a SqlRewriterStragtegyFactory to decide how much JSQLParser we want to take into account (or bypass the rewrite for certain queries).

@mp911de mp911de added the type: enhancement A general enhancement label Sep 12, 2023
@fatihdogmus
Copy link

Hello, can I pick this issue? I'm new to contributing to open source, so this issue seems easy enough to do for a first timer 🙂

danvandeee added a commit to danvandeee/spring-data-jpa that referenced this issue Feb 4, 2024
Annotation to declare native queries directly on repository methods. NativeQuery acts as a shortcut for @query(nativeQuery = true)

See spring-projects#3155
danvandeee added a commit to danvandeee/spring-data-jpa that referenced this issue Feb 4, 2024
Annotation to declare native queries directly on repository methods. NativeQuery acts as a shortcut for @query(nativeQuery = true)

See spring-projects#3155
@danvandeee
Copy link
Contributor

Hi as it seemed no one had picked this up yet i thought of picking it up.
Created a pr for it #3353

mp911de pushed a commit that referenced this issue Jun 21, 2024
Annotation to declare native queries directly on repository methods. NativeQuery acts as a shortcut for @query(nativeQuery = true)

See #3155
@mp911de mp911de added this to the 3.4 M1 (2024.1.0) milestone Jun 26, 2024
@mp911de mp911de linked a pull request Jun 26, 2024 that will close this issue
@mp911de mp911de changed the title Consider introducing @NativeQuery as alias for @Query(…, native = true) Add @NativeQuery annotation as alias for @Query(nativeQuery=true) Jun 26, 2024
mp911de added a commit that referenced this issue Jun 26, 2024
Add tests, update documentation, add support for SQL ResultSet mapping.

See #3155
Original pull request: #3353
mp911de added a commit that referenced this issue Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants