Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SOL to the moon
DBGrep
Commits
7df33bfa
Commit
7df33bfa
authored
Nov 03, 2021
by
Müller Marc
Browse files
d
parent
9b10a224
Pipeline
#27762
passed with stages
in 1 minute and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/client/client.ts
View file @
7df33bfa
...
...
@@ -64,7 +64,7 @@ export default class Client {
// }
getAllMatchingColumns
(
searchword
:
string
,
columns
:
Column
[]){
let
allTablesToQuerry
=
[
""
]
let
allTablesToQuerry
:
string
[]
=
[]
//check if searchword is number or string:
let
isNumber
:
boolean
=
isNumeric
(
searchword
)
//filter:
...
...
@@ -93,14 +93,12 @@ export default class Client {
// TODO: actually printing columns multiple times
matchingColumns
.
forEach
(
column
=>
{
if
(
column
!=
""
)
{
this
.
dbClient
(
tableName
).
where
(
column
,
'
like
'
,
'
%
'
+
searchword
+
'
%
'
)
.
then
((
rows
)
=>
{
for
(
var
i
:
number
=
0
;
i
<
rows
.
length
;
i
++
){
console
.
log
(
rows
[
i
])
}
});
}
this
.
dbClient
(
tableName
).
where
(
column
,
'
like
'
,
'
%
'
+
searchword
+
'
%
'
)
.
then
((
rows
)
=>
{
for
(
var
i
:
number
=
0
;
i
<
rows
.
length
;
i
++
){
console
.
log
(
rows
[
i
])
}
});
});
}
}
\ No newline at end of file
src/main.ts
View file @
7df33bfa
...
...
@@ -19,8 +19,6 @@ const client = new Client({
//client.loadMetadata()
if
(
args
.
searchword
){
console
.
log
(
args
.
searchword
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment