summaryrefslogtreecommitdiffstats
path: root/src/Components/IntoKeyword.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Components/IntoKeyword.php')
-rw-r--r--src/Components/IntoKeyword.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Components/IntoKeyword.php b/src/Components/IntoKeyword.php
index cb25481..9b52c7c 100644
--- a/src/Components/IntoKeyword.php
+++ b/src/Components/IntoKeyword.php
@@ -128,4 +128,20 @@ class IntoKeyword extends Component
--$list->idx;
return $ret;
}
+
+ /**
+ * @param IntoKeyword $component The component to be built.
+ *
+ * @return string
+ */
+ public static function build($component)
+ {
+ if ($component->type === 'OUTFILE') {
+ return 'OUTFILE "' . $component->dest . '"';
+ } else {
+ $columns = !empty($component->columns) ?
+ '(' . implode(', ', $component->columns) . ')' : '';
+ return Expression::build($component->dest) . $columns;
+ }
+ }
}