Skip to content

Commit 06ab070

Browse files
committed
feat: Use fully qualified table name in "Select Top x rows" action when a click on it is combined with Shift
https://www.heidisql.com/forum.php?t=45359
1 parent aabe034 commit 06ab070

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎source/main.pas‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5236,6 +5236,7 @@ procedure TMainForm.actQueryTableExecute(Sender: TObject);
52365236
Obj: TDBObject;
52375237
Tab: TQueryTab;
52385238
Conn: TDBConnection;
5239+
TableName: String;
52395240
begin
52405241
// Query table data
52415242
Conn := ActiveConnection;
@@ -5248,7 +5249,11 @@ procedure TMainForm.actQueryTableExecute(Sender: TObject);
52485249

52495250
for Obj in Objects do begin
52505251
Tab := GetOrCreateEmptyQueryTab(True);
5251-
Tab.Memo.Text := Conn.ApplyLimitClause('SELECT', '* FROM '+Obj.QuotedName, AppSettings.ReadInt(asDatagridRowsPerStep), 0);
5252+
if ssShift in GetKeyShiftState then
5253+
TableName := Obj.QuotedDbAndTableName
5254+
else
5255+
TableName := Obj.QuotedName;
5256+
Tab.Memo.Text := Conn.ApplyLimitClause('SELECT', '* FROM '+TableName, AppSettings.ReadInt(asDatagridRowsPerStep), 0);
52525257
SetTabCaption(Tab.TabSheet.TabIndex, Obj.Name);
52535258
actExecuteQueryExecute(Sender);
52545259
end;

0 commit comments

Comments
 (0)