Skip to content

Commit a7f4f24

Browse files
Surbhi-sharma1samarpanB
authored andcommitted
fix(sequelize): modified regex to match select query with parenthesis
modified regex to match select query with parenthesis fix #10312 Signed-off-by: Surbhi-sharma1 <[email protected]>
1 parent 8f0308f commit a7f4f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/sequelize/src/sequelize/sequelize.datasource.base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class SequelizeDataSource implements LifeCycleObserver {
209209
// Sequelize returns the select query result in an array at index 0 and at index 1 is the actual Result instance
210210
// Whereas in juggler it is returned directly as plain array.
211211
// Below condition maps that 0th index to final result to match juggler's behaviour
212-
if (command.match(/^select/i) && result.length >= 1) {
212+
if (command.match(/^(select|\(select)/i) && result.length >= 1) {
213213
return result[0];
214214
}
215215

0 commit comments

Comments
 (0)