Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
C3SL
blendb
Commits
07104416
Commit
07104416
authored
Sep 09, 2019
by
Rafael Dias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#112
: Fix SELECT all
Signed-off-by:
rafaelcosc
<
rpd17@inf.ufpr.br
>
parent
ac597977
Pipeline
#21499
passed with stages
in 1 minute and 25 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
src/adapter/sql.ts
src/adapter/sql.ts
+24
-1
No files found.
src/adapter/sql.ts
View file @
07104416
...
...
@@ -121,7 +121,30 @@ export abstract class SQLAdapter extends Adapter {
sort
=
"
ORDER BY
"
+
order
;
}
return
withClause
+
"
SELECT * FROM
"
+
view
.
name
+
sort
+
"
;
"
;
const
dimensions
=
view
.
dimensions
.
map
((
item
)
=>
{
return
"
\"
"
+
item
.
name
+
"
\"
"
;
}).
join
(
"
,
"
);
const
metrics
=
view
.
metrics
.
map
((
item
)
=>
{
return
"
\"
"
+
item
.
name
+
"
\"
"
;
}).
join
(
"
,
"
);
let
attributes
=
""
;
if
(
dimensions
.
length
>
0
)
{
if
(
metrics
.
length
>
0
)
{
attributes
=
dimensions
+
"
,
"
+
metrics
;
}
else
{
attributes
=
dimensions
;
}
}
else
{
attributes
=
metrics
;
}
return
withClause
+
"
SELECT
"
+
attributes
+
"
FROM
"
+
view
.
name
+
sort
+
"
;
"
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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