File tree 2 files changed +7
-2
lines changed
src/main/java/tech/ydb/hibernate/dialect
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.9.5 ##
2
+
3
+ - Added query hint for view index for "select * from ... where" queries
4
+
1
5
## 0.9.4 ##
2
6
3
7
- Fixed the generated bool value
Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ public class YdbDialect extends Dialect {
64
64
65
65
private static final Exporter <ForeignKey > FOREIGN_KEY_EMPTY_EXPORTER = new EmptyExporter <>();
66
66
private static final Exporter <Constraint > UNIQUE_KEY_EMPTY_EXPORTER = new EmptyExporter <>();
67
- private static final Pattern QUERY_PATTERN = Pattern .compile ("^\\ s*(select.+?from\\ s+\\ w+)(.+where.+)$" , Pattern .CASE_INSENSITIVE );
67
+ private static final Pattern SELECT_FROM_WHERE_QUERY_PATTERN = Pattern
68
+ .compile ("^\\ s*(select.+?from\\ s+\\ w+)(.+where.+)$" , Pattern .CASE_INSENSITIVE );
68
69
69
70
public YdbDialect (DialectResolutionInfo dialectResolutionInfo ) {
70
71
super (dialectResolutionInfo );
@@ -123,7 +124,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
123
124
124
125
@ Override
125
126
public String getQueryHintString (String query , String hints ) {
126
- Matcher matcher = QUERY_PATTERN .matcher (query );
127
+ Matcher matcher = SELECT_FROM_WHERE_QUERY_PATTERN .matcher (query );
127
128
if (matcher .matches () && matcher .groupCount () > 1 ) {
128
129
String startToken = matcher .group (1 );
129
130
String endToken = matcher .group (2 );
You can’t perform that action at this time.
0 commit comments