Skip to content

Commit 63e88e4

Browse files
authored
Merge pull request #4 from kishorevaishnav/master
Displayed Query + Timestamp + "\n"
2 parents 073aa08 + 4938b70 commit 63e88e4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

extension/commands.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ function runFile ( { conn, file, channel, onEnd }) {
77

88
const args = [
99
"-d", conn,
10-
"-f", file
10+
"-f", file,
11+
"-e"
1112
];
1213

1314
const psql = 'psql'
@@ -30,6 +31,9 @@ function runFile ( { conn, file, channel, onEnd }) {
3031

3132
channel.show( vscode.ViewColumn.Two )
3233
bgtask.stdout.setEncoding('utf8')
34+
var dt = new Date();
35+
var utcDate = dt.toUTCString();
36+
channel.appendLine(`--------- ${utcDate} ---------`)
3337

3438
const toChannel = data => {
3539
const str = data.toString(), lines = str.match( /[^\r\n]+/g )
@@ -42,7 +46,7 @@ function runFile ( { conn, file, channel, onEnd }) {
4246
onEnd = onEnd ? onEnd : ()=>{}
4347

4448
bgtask.stdout.on( 'end', () => {
45-
channel.appendLine( `${psql} end.` )
49+
channel.appendLine( `${psql} end.\n` )
4650
onEnd()
4751
})
4852

0 commit comments

Comments
 (0)