FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodejs-driver/samples/HelpSession.ts at develop · Teradata/nodejs-driver · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Teradata
/
nodejs-driver
Public
Notifications
You must be signed in to change notification settings
Fork
13
Star
15
Code
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
nodejs-driver
/
samples
/
HelpSession.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (24 loc) · 823 Bytes
Breadcrumbs
nodejs-driver
/
samples
/
HelpSession.ts
Copy path
File metadata and controls
28 lines (24 loc) · 823 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2023 by Teradata Corporation. All rights reserved.
// This sample program demonstrates how to obtain and display session information.
//
@ts
-ignore
import
*
as
teradatasql
from
"teradatasql"
;
type
Row
=
any
[
]
|
null
;
const
con
:
teradatasql
.
TeradataConnection
=
teradatasql
.
connect
(
{
host
:
"whomooz"
,
user
:
"guest"
,
password
:
"please"
}
)
;
try
{
const
cur
:
teradatasql
.
TeradataCursor
=
con
.
cursor
(
)
;
try
{
cur
.
execute
(
"help session"
)
;
const
row
:
Row
=
cur
.
fetchone
(
)
;
if
(
row
)
{
for
(
let
i
:
number
=
0
;
i
<
row
.
length
;
i
++
)
{
if
(
cur
.
description
)
{
console
.
log
(
`
${
cur
.
description
[
i
]
[
0
]
.
padEnd
(
40
)
}
,
${
row
[
i
]
}
`
)
;
}
}
}
}
finally
{
cur
.
close
(
)
;
}
}
finally
{
con
.
close
(
)
;
}
Back
|
FazBrowse Home
|
New Git URL