|
15 | 15 | #include "gdalalg_vector_clip.h"
|
16 | 16 | #include "gdalalg_vector_filter.h"
|
17 | 17 | #include "gdalalg_vector_reproject.h"
|
| 18 | +#include "gdalalg_vector_sql.h" |
18 | 19 | #include "gdalalg_vector_write.h"
|
19 | 20 |
|
20 | 21 | #include "cpl_conv.h"
|
@@ -60,9 +61,12 @@ void GDALVectorPipelineStepAlgorithm::AddInputArgs(bool hiddenForCLI)
|
60 | 61 | AddInputDatasetArg(&m_inputDataset, GDAL_OF_VECTOR,
|
61 | 62 | /* positionalAndRequired = */ !hiddenForCLI)
|
62 | 63 | .SetHiddenForCLI(hiddenForCLI);
|
63 |
| - AddArg("input-layer", 'l', _("Input layer name(s)"), &m_inputLayerNames) |
64 |
| - .AddAlias("layer") |
65 |
| - .SetHiddenForCLI(hiddenForCLI); |
| 64 | + if (GetName() != "sql") |
| 65 | + { |
| 66 | + AddArg("input-layer", 'l', _("Input layer name(s)"), &m_inputLayerNames) |
| 67 | + .AddAlias("layer") |
| 68 | + .SetHiddenForCLI(hiddenForCLI); |
| 69 | + } |
66 | 70 | }
|
67 | 71 |
|
68 | 72 | /************************************************************************/
|
@@ -94,10 +98,13 @@ void GDALVectorPipelineStepAlgorithm::AddOutputArgs(
|
94 | 98 | &m_appendLayer)
|
95 | 99 | .SetDefault(false)
|
96 | 100 | .SetHiddenForCLI(hiddenForCLI);
|
97 |
| - AddArg("output-layer", shortNameOutputLayerAllowed ? 'l' : 0, |
98 |
| - _("Output layer name"), &m_outputLayerName) |
99 |
| - .AddHiddenAlias("nln") // For ogr2ogr nostalgic people |
100 |
| - .SetHiddenForCLI(hiddenForCLI); |
| 101 | + if (GetName() != "sql") |
| 102 | + { |
| 103 | + AddArg("output-layer", shortNameOutputLayerAllowed ? 'l' : 0, |
| 104 | + _("Output layer name"), &m_outputLayerName) |
| 105 | + .AddHiddenAlias("nln") // For ogr2ogr nostalgic people |
| 106 | + .SetHiddenForCLI(hiddenForCLI); |
| 107 | + } |
101 | 108 | }
|
102 | 109 |
|
103 | 110 | /************************************************************************/
|
@@ -178,6 +185,7 @@ GDALVectorPipelineAlgorithm::GDALVectorPipelineAlgorithm()
|
178 | 185 | m_stepRegistry.Register<GDALVectorClipAlgorithm>();
|
179 | 186 | m_stepRegistry.Register<GDALVectorReprojectAlgorithm>();
|
180 | 187 | m_stepRegistry.Register<GDALVectorFilterAlgorithm>();
|
| 188 | + m_stepRegistry.Register<GDALVectorSQLAlgorithm>(); |
181 | 189 | }
|
182 | 190 |
|
183 | 191 | /************************************************************************/
|
|
0 commit comments