blob: a8768f9e15fc0c5b5a48fe6b8eecb7e182cb4982 [file] [log] [blame]
/**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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.
//
// @@@ END COPYRIGHT @@@
**********************************************************************/
/**************************************************************************
**************************************************************************/
//
// MODULE: ODBC.IDL
//
// PURPOSE: Describes the ODBC RPC services.
//
// Modification History
// 15Jan98 Changed MonitorCallContext method to include diaglogueId
//
// 22Aug97 Changed some of the typedefs into basic types, since these typedefs
// are declared elsewhere. Modified Error as an Exception instead of
// out parameters. Other changes to fit to compile without any error
// 09Sep97 Added a new method SetConnectionOption and added a stmtType parameter
// in Prepare. (StmtType could be INTERNAL_STMT or EXTERNAL_STMT
// 13Sep97 Added a new method GetSQLGetTypeInfo.
// 22Sep97 Removed Association Services, moved to own IDL
#ifndef ODBCSVC_DEFINED
#define ODBCSVC_DEFINED
#include "odbcCommon.idl"
module odbc {
#define ODBCsvc_uuid ((UUID_def) "9101c0ac-e07a-11d0-a543-0060b01ad6ae")
interface SQLSvc {
exception ParamError {string ParamDesc;};
exception SQLError {ERROR_DESC_LIST_def errorList;};
exception SQLInvalidHandle{};
exception SQLNeedData{};
exception SQLNoDataFound {};
exception InvalidUser{ERROR_DESC_LIST_def errorList;};
exception SQLRetryCompile{ERROR_DESC_LIST_def errorList;};
exception InvalidConnection {};
// exception RGError {RES_HIT_DESC_def resGov;};
exception ProcessStopError {string ErrorText;};
exception SQLStillExecuting{};
exception SQLQueryCancelled{long sqlcode;};
exception CancelNotPossible {};
exception CancelSQLError { long sqlcode;};
exception TransactionError{};
exception StatisticsError{};
exception StatisticsAlreadyDisabled{};
exception StatisticsAlreadyEnabled{};
exception TraceError{};
exception TraceAlreadyDisabled{};
exception TraceAlreadyEnabled{};
void InitializeDialogue(
in USER_DESC_def userDesc,
in CONNECTION_CONTEXT_def inContext,
in DIALOGUE_ID_def dialogueId,
out OUT_CONNECTION_CONTEXT_def outContext)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle, SQLNeedData, InvalidUser);
void TerminateDialogue (
in DIALOGUE_ID_def dialogueId)
raises (ParamError, InvalidConnection, SQLError);
void MonitorCall(in DIALOGUE_ID_def dialogueId);
void SetConnectionOption(
in DIALOGUE_ID_def dialogueId,
in short connectionOption,
in long optionValueNum,
in string optionValueStr,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle);
void EndTransaction (
in DIALOGUE_ID_def dialogueId,
in unsigned short transactionOpt,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle, TransactionError);
void Prepare (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in STMT_NAME_def stmtExplainLabel,
in short stmtType,
in string sqlString,
in short sqlAsyncEnable,
in long queryTimeout,
out long estimatedCost,
out SQLItemDescList_def inputDesc,
out SQLItemDescList_def outputDesc,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLStillExecuting, SQLQueryCancelled, TransactionError);
void ExecDirect (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in string cursorName,
in STMT_NAME_def stmtExplainLabel,
in short stmtType,
in short sqlStmtType,
in string sqlString,
in short sqlAsyncEnable,
in long queryTimeout,
out long estimatedCost,
out SQLItemDescList_def outputDesc,
out long rowsAffected,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLStillExecuting, SQLQueryCancelled, TransactionError);
void ExecuteN (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in string cursorName,
in short sqlStmtType,
in long inputRowCnt,
in SQLValueList_def inputValueList,
in short sqlAsyncEnable,
in long queryTimeout,
out long rowsAffected,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle, SQLNeedData,
SQLRetryCompile, SQLStillExecuting, SQLQueryCancelled, TransactionError);
void FetchN (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in long maxRowCnt,
in long maxRowLen,
in short sqlAsyncEnable,
in long queryTimeout,
out long rowsAffected,
out SQLValueList_def outputValueList,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle,
SQLNoDataFound, SQLStillExecuting, SQLQueryCancelled, TransactionError);
void Close (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in unsigned short freeResourceOpt,
out long rowsAffected,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, TransactionError);
void CancelStatement (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, CancelSQLError, SQLInvalidHandle, CancelNotPossible);
void SetDiagInfo (
in DIALOGUE_ID_def dialogueId,
in long DiagnosticFlag,
in string ClientPCName);
void StopServer(in DIALOGUE_ID_def dialogueId,
in long StopType,
in string ReasonText)
raises (ParamError, ProcessStopError);
void SetTestPoint(
in DIALOGUE_ID_def dialogueId,
in short TestPoint,
in unsigned long Operation)
raises (ParamError, InvalidConnection);
void ClearTestPoint(
in DIALOGUE_ID_def dialogueId,
in short TestPoint,
in unsigned short Operation)
raises (ParamError, InvalidConnection);
void GetSQLCatalogs (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in short APIType,
in SQL_IDENTIFIER_def catalogNm,
in SQL_IDENTIFIER_def schemaNm,
in SQL_IDENTIFIER_def tableNm,
in string<128> tableTypeList,
in SQL_IDENTIFIER_def columnNm,
in long columnType,
in long rowIdScope,
in long nullable,
in long uniqueness,
in long accuracy,
in short sqlType,
in unsigned long metadataId,
in SQL_IDENTIFIER_def fkcatalogNm,
in SQL_IDENTIFIER_def fkschemaNm,
in SQL_IDENTIFIER_def fktableNm,
out STMT_NAME_def catStmtLabel,
out SQLItemDescList_def outputDesc,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle);
//
// General Parameter Interface
//
void GeneralParam(
in GEN_ParamList_def paramList)
raises (ParamError);
//
// Performance
//
void FetchPerf (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in long maxRowCnt,
in long maxRowLen,
in short sqlAsyncEnable,
in long queryTimeout,
out long rowsAffected,
out SQL_DataValue_def outputDataValue,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle,
SQLNoDataFound, SQLStillExecuting, SQLQueryCancelled, TransactionError);
//
// Rowset
//
void FetchRowset (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in long maxRowCnt,
in long maxRowLen,
in short sqlAsyncEnable,
in long queryTimeout,
out long rowsAffected,
out SQL_DataValue_def outputDataValue,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle,
SQLNoDataFound, SQLStillExecuting, SQLQueryCancelled, TransactionError);
void PrepareRowset (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in STMT_NAME_def stmtExplainLabel,
in short stmtType,
in short sqlStmtType,
in string sqlString,
in short sqlAsyncEnable,
in long queryTimeout,
in long maxRowsetSize,
out long estimatedCost,
out SQLItemDescList_def inputDesc,
out SQLItemDescList_def outputDesc,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLStillExecuting, SQLQueryCancelled, TransactionError);
void ExecDirectRowset (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in string cursorName,
in STMT_NAME_def stmtExplainLabel,
in short stmtType,
in short sqlStmtType,
in string sqlString,
in short sqlAsyncEnable,
in long queryTimeout,
in long maxRowsetSize,
out long estimatedCost,
out SQLItemDescList_def outputDesc,
out long rowsAffected,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLStillExecuting, SQLQueryCancelled, TransactionError);
void ExecuteRowset (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in string cursorName,
in short sqlStmtType,
in long inputRowCnt,
in SQL_DataValue_def inputDataValue,
in short sqlAsyncEnable,
in long queryTimeout,
out long rowsAffected,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle, SQLNeedData,
SQLRetryCompile, SQLStillExecuting, SQLQueryCancelled, TransactionError);
void EnableServerTrace(in DIALOGUE_ID_def dialogueId,
in long TraceType)
raises (ParamError, TraceError, TraceAlreadyEnabled);
void DisableServerTrace(in DIALOGUE_ID_def dialogueId,
in long TraceType)
raises (ParamError, TraceError, TraceAlreadyDisabled);
void EnableServerStatistics(
in DIALOGUE_ID_def dialogueId,
in long StatisticsType)
raises (ParamError, StatisticsError, StatisticsAlreadyEnabled);
void DisableServerStatistics(
in DIALOGUE_ID_def dialogueId)
raises (ParamError, StatisticsError, StatisticsAlreadyDisabled);
void UpdateServerContext(in SRVR_CONTEXT_def srvrContext)
raises (ParamError, SQLError);
void ExecuteCall (
in DIALOGUE_ID_def dialogueId,
in STMT_NAME_def stmtLabel,
in string cursorName,
in short sqlStmtType,
in long inputRowCnt,
in SQLValueList_def inputValueList,
in short sqlAsyncEnable,
in long queryTimeout,
out SQLValueList_def outputValueList,
out long rowsAffected,
out ERROR_DESC_LIST_def sqlWarning)
raises (ParamError, InvalidConnection, SQLError, SQLInvalidHandle, SQLNeedData,
SQLRetryCompile, SQLStillExecuting, SQLQueryCancelled, TransactionError);
}; // end of SQL interface
}; // end of ODBC module
#endif