123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344 |
- /*##############################################################################
- HPCC SYSTEMS software Copyright (C) 2014 HPCC Systems.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ############################################################################## */
- EspInclude(ws_workunits);
- EspInclude(ws_topology);
- ESPStruct HPCCColumn
- {
- string Name;
- string Type;
- };
- ESPStruct HPCCTable
- {
- string Name;
- ESParray<ESPstruct HPCCColumn, Column> Columns;
- string ECL;
- string Format;
- string ContentType;
- string Description;
- boolean IsKeyed;
- //string IndexFilePosFieldName;
- boolean IsSuper;
- string CsvQuote;
- string CsvSeparate;
- string CsvTerminate;
- string Group;
- integer MaxRecordSize;
- string Modified;
- integer NumParts;
- string Owner;
- };
- ESPstruct OutputDataset
- {
- string name;
- ESParray<ESPstruct HPCCColumn, OutParam> OutParams;
- };
- ESPstruct QuerySignature
- {
- ESParray<ESPstruct HPCCColumn, InParam> InParams;
- ESParray<ESPstruct OutputDataset, ResultSet> ResultSets;
- };
- ESPstruct PublishedQuery
- {
- string Name;
- string Id;
- string Wuid;
- boolean Suspended;
- ESPstruct QuerySignature Signature;
- };
- ESPStruct QuerySetAliasMap
- {
- string Id;
- string Name;
- };
- ESPStruct HPCCQuerySet
- {
- string Name;
- ESParray<ESPstruct PublishedQuery, QuerySetQuery> QuerySetQueries;
- ESParray<ESPstruct QuerySetAliasMap, QuerySetAlias> QuerySetAliases;
- };
- ESPStruct HPCCTargetCluster
- {
- string Name;
- ESParray<ESPstruct PublishedQuery, QuerySetQuery> QuerySetQueries;
- ESParray<ESPstruct QuerySetAliasMap, QuerySetAlias> QuerySetAliases;
- };
- ESPrequest PrepareSQLRequest
- {
- [rows(28), cols(80)] string SqlText;
- string TargetCluster; //where should this be compiled
- [min_ver("3.04")] ESParray<string, AlternateCluster> AlternateClusters; //Although this appears to be a runtime option, in ECL this is a compiletime option.
- string TargetQuerySet; //pertaining to Stored Proc calls
- int Wait(-1);
- //not so sure about this setting result limits in the prepare
- //int resultLimit(0);
- };
- ESPresponse [exceptions_inline] PrepareSQLResponse
- {
- ESPstruct ECLWorkunit Workunit;
- string Result;
- };
- ESPrequest ExecuteSQLRequest
- {
- [rows(28), cols(80)] string SqlText;
- string UserName;
- string TargetCluster; //where should this compile and execute
- [min_ver("3.04")] ESParray<string, AlternateCluster> AlternateClusters;
- string TargetQuerySet; //pertaining to Stored Proc calls
- boolean SuppressResults(false);
- boolean SuppressXmlSchema(true);
- int Wait(-1);
- int resultLimit(0);
- int ResultWindowStart(0);
- int ResultWindowCount(0);
- [min_ver(3.05)] boolean IgnoreCache(false);
- };
- ESPresponse [exceptions_inline] ExecuteSQLResponse
- {
- string ParentWuId;
- string Result;
- ESPstruct ECLWorkunit Workunit;
- int resultLimit;
- unsigned ResultWindowStart;
- unsigned ResultWindowCount;
- };
- ESPrequest ExecutePreparedSQLRequest
- {
- string WuId;
- string UserName;
- string TargetCluster; //where should this execute
- boolean SuppressResults(false);
- boolean SuppressXmlSchema(true);
- int Wait(-1);
- //int resultLimit(0); underlying WU code doesn't allow setting result limits on cloned wu
- int ResultWindowStart(0);
- int ResultWindowCount(0);
- ESParray<ESPstruct NamedValue> Variables;
- };
- ESPresponse [exceptions_inline] ExecutePreparedSQLResponse
- {
- string ParentWuId;
- string Result;
- //int resultLimit;
- unsigned ResultWindowStart;
- unsigned ResultWindowCount;
- ESPstruct ECLWorkunit Workunit;
- };
- ESPrequest GetDBSystemInfoRequest
- {
- boolean IncludeAll(true);
- };
- ESPresponse [exceptions_inline] GetDBSystemInfoResponse
- {
- string Name;
- string FullVersion;
- string Major;
- string Minor;
- string Point;
- string Project;
- string Maturity;
- [min_ver("3.01")] string WsSQLFullVersion;
- [min_ver("3.01")] string WsSQLMajor;
- [min_ver("3.01")] string WsSQLMinor;
- [min_ver("3.01")] string WsSQLPoint;
- [min_ver("3.01")] string WsSQLProject;
- [min_ver("3.01")] string WsSQLMaturity;
- };
- ESPrequest GetDBMetaDataRequest
- {
- boolean IncludeTables;
- string TableFilter;
- boolean IncludeStoredProcedures;
- string QuerySet;
- boolean IncludeTargetClusters;
- string ClusterType; //ALLCLUSTERS | ROOT
- };
- ESPresponse [exceptions_inline] GetDBMetaDataResponse
- {
- ESParray<ESPstruct HPCCTable, Table> Tables;
- integer TableCount;
- ESParray<ESPstruct HPCCQuerySet, QuerySet> QuerySets;
- ESParray<string, ClusterName> ClusterNames;
- };
- ESPrequest GetResultsRequest
- {
- string WuId;
- boolean SuppressXmlSchema(true);
- int ResultWindowStart(0);
- int ResultWindowCount(0);
- };
- ESPresponse [exceptions_inline] GetResultsResponse
- {
- string Result;
- unsigned ResultWindowStart;
- unsigned ResultWindowCount;
- ESPstruct ECLWorkunit Workunit;
- };
- ESPrequest EchoRequest
- {
- string Request;
- };
- ESPresponse EchoResponse
- {
- string Response;
- };
- ESPStruct RelatedIndexSet
- {
- String FileName;
- ESParray<String, Index> Indexes;
- };
- ESPrequest GetRelatedIndexesRequest
- {
- ESParray<String, FileName> FileNames;
- };
- ESPresponse GetRelatedIndexesResponse
- {
- ESParray<ESPstruct RelatedIndexSet, RelatedIndexSet> RelatedIndexSets;
- };
- ESPrequest SetRelatedIndexesRequest
- {
- ESParray<ESPstruct RelatedIndexSet, RelatedIndexSet> RelatedIndexSets;
- };
- ESPresponse SetRelatedIndexesResponse
- {
- ESParray<ESPstruct RelatedIndexSet, RelatedIndexSet> RelatedIndexSets;
- };
- ESPenum HPCCFieldType : string
- {
- BOOLEAN("BOOLEAN"),
- INTEGER("INTEGER"),
- xUNSIGNED("UNSIGNED"),
- REAL("REAL"),
- DECIMAL("DECIMAL"),
- UDECIMAL("UDECIMAL"),
- xSTRING("STRING"),
- QSTRING("QSTRING"),
- UNICODE("UNICODE"),
- DATA("DATA"),
- VARSTRING("VARSTRING"),
- VARUNICODE("VARUNICODE"),
- };
- ESPStruct EclFieldType
- {
- ESPenum HPCCFieldType Type;
- String Locale;
- Integer Length;
- Integer Precision;
- };
- ESPStruct EclFieldDeclaration
- {
- String FieldName;
- ESPStruct EclFieldType EclFieldType;
- };
- ESPstruct DataTypeParam
- {
- String Name;
- ESParray<String, Value> Values;
- };
- ESPenum HPCCFileType : string
- {
- FLAT("FLAT"),
- CSV("CSV"),
- JSON("JSON"),
- XML("XML"),
- };
- ESPStruct DataType
- {
- ESPenum HPCCFileType Type;
- ESParray<ESPstruct DataTypeParam, Param> Params;
- };
- ESPStruct DataSourceInfo
- {
- String SprayedFileName;
- String LandingZoneIP;
- String LandingZonePath;
- String LandingZoneFileName;
- };
- ESPrequest CreateTableAndLoadRequest
- {
- String TableName;
- String TableDescription;
- Boolean Overwrite;
- ESParray<ESPstruct EclFieldDeclaration, EclField> EclFields;
- String TargetCluster;
- String Owner;
- ESPStruct DataSourceInfo DataSource;
- ESPStruct DataType DataSourceType;
- int Wait(-1);
- };
- ESPresponse CreateTableAndLoadResponse
- {
- String TableName;
- Boolean Success;
- String EclRecordDefinition;
- ESPstruct ECLWorkunit Workunit;
- };
- ESPservice [version("3.05"), default_client_version("3.05"), auth_feature("DEFERRED"), exceptions_inline("./smc_xslt/exceptions.xslt")] wssql
- {
- ESPmethod [min_ver("3.03")] CreateTableAndLoad(CreateTableAndLoadRequest, CreateTableAndLoadResponse);
- ESPmethod [min_ver("3.02")] SetRelatedIndexes(SetRelatedIndexesRequest, SetRelatedIndexesResponse);
- ESPmethod [min_ver("3.02")] GetRelatedIndexes(GetRelatedIndexesRequest, GetRelatedIndexesResponse);
- ESPmethod [] PrepareSQL(PrepareSQLRequest, PrepareSQLResponse);
- ESPmethod [] ExecuteSQL(ExecuteSQLRequest, ExecuteSQLResponse);
- ESPmethod [] ExecutePreparedSQL(ExecutePreparedSQLRequest, ExecutePreparedSQLResponse);
- ESPmethod [] GetResults(GetResultsRequest, GetResultsResponse);
- ESPmethod [] GetDBSystemInfo(GetDBSystemInfoRequest, GetDBSystemInfoResponse);
- ESPmethod [] GetDBMetaData(GetDBMetaDataRequest, GetDBMetaDataResponse);
- ESPmethod Echo(EchoRequest, EchoResponse);
- };
- SCMexportdef(wssql);
- SCMapi(wssql) IClientwssql *createwssqlClient();
|