1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10*d1766043SAndrew Rist * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d1766043SAndrew Rist * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19*d1766043SAndrew Rist * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_Statement_idl__ 24cdf0e10cSrcweir#define __com_sun_star_sdbc_Statement_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_lang_XComponent_idl__ 27cdf0e10cSrcweir#include <com/sun/star/lang/XComponent.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__ 31cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir#ifndef __com_sun_star_util_XCancellable_idl__ 35cdf0e10cSrcweir#include <com/sun/star/util/XCancellable.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir module com { module sun { module star { module sdbc { 39cdf0e10cSrcweir 40cdf0e10cSrcweir published interface XWarningsSupplier; 41cdf0e10cSrcweir published interface XStatement; 42cdf0e10cSrcweir published interface XBatchExecution; 43cdf0e10cSrcweir published interface XMultipleResults; 44cdf0e10cSrcweir published interface XCloseable; 45cdf0e10cSrcweir 46cdf0e10cSrcweir 47cdf0e10cSrcweir/** is used for executing a static SQL statement and obtaining the results 48cdf0e10cSrcweir produced by it. 49cdf0e10cSrcweir 50cdf0e10cSrcweir <p> 51cdf0e10cSrcweir Only one ResultSet per Statement can be open at any point in 52cdf0e10cSrcweir time. Therefore, if the reading of one ResultSet is interleaved 53cdf0e10cSrcweir with the reading of another, each must have been generated by 54cdf0e10cSrcweir different Statements. All statement <code>execute</code> methods implicitly 55cdf0e10cSrcweir close a statement's current ResultSet if an open one exists. 56cdf0e10cSrcweir </p> 57cdf0e10cSrcweir */ 58cdf0e10cSrcweirpublished service Statement 59cdf0e10cSrcweir{ 60cdf0e10cSrcweir 61cdf0e10cSrcweir /** optional for implementation, controls the releasing of resources 62cdf0e10cSrcweir and the notification of registered listeners. 63cdf0e10cSrcweir */ 64cdf0e10cSrcweir [optional] interface com::sun::star::lang::XComponent; 65cdf0e10cSrcweir 66cdf0e10cSrcweir 67cdf0e10cSrcweir /** freeing all resources of a statement. A related resultset will be 68cdf0e10cSrcweir freed as well. 69cdf0e10cSrcweir */ 70cdf0e10cSrcweir interface XCloseable; 71cdf0e10cSrcweir 72cdf0e10cSrcweir // gives access to the properties. 73cdf0e10cSrcweir interface com::sun::star::beans::XPropertySet; 74cdf0e10cSrcweir 75cdf0e10cSrcweir /** could be used for cancelling the execution of SQL statements if both 76cdf0e10cSrcweir the DBMS and the driver support aborting an SQL statement. 77cdf0e10cSrcweir The implementation is optional. 78cdf0e10cSrcweir */ 79cdf0e10cSrcweir [optional] interface com::sun::star::util::XCancellable; 80cdf0e10cSrcweir 81cdf0e10cSrcweir /** is the interface for executing SQL commands. 82cdf0e10cSrcweir */ 83cdf0e10cSrcweir interface XStatement; 84cdf0e10cSrcweir 85cdf0e10cSrcweir 86cdf0e10cSrcweir /** provides the ability of batch execution. This interface is optional 87cdf0e10cSrcweir for execution. 88cdf0e10cSrcweir <p> 89cdf0e10cSrcweir A driver implementing batch execution must return 90cdf0e10cSrcweir <TRUE/> 91cdf0e10cSrcweir for 92cdf0e10cSrcweir <member scope= "com::sun::star::sdbc"> XDatabaseMetaData::supportsBatchUpdates()</member> 93cdf0e10cSrcweir </p> 94cdf0e10cSrcweir */ 95cdf0e10cSrcweir [optional] interface XBatchExecution; 96cdf0e10cSrcweir 97cdf0e10cSrcweir 98cdf0e10cSrcweir /** controls the chaining of warnings, which may occur on every call 99cdf0e10cSrcweir to the connected database. Chained warnings from previous calls will be 100cdf0e10cSrcweir cleared before processing a new call. 101cdf0e10cSrcweir */ 102cdf0e10cSrcweir interface XWarningsSupplier; 103cdf0e10cSrcweir 104cdf0e10cSrcweir 105cdf0e10cSrcweir /** covers the handling of multiple results after executing an SQL command. 106cdf0e10cSrcweir The implementation is optional. 107cdf0e10cSrcweir */ 108cdf0e10cSrcweir [optional] interface XMultipleResults; 109cdf0e10cSrcweir 110cdf0e10cSrcweir 111cdf0e10cSrcweir /** retrieves the number of seconds the driver will wait for a Statement 112cdf0e10cSrcweir to execute. If the limit is exceeded, a SQLException is thrown. 113cdf0e10cSrcweir There is no limitation, if set to zero. 114cdf0e10cSrcweir */ 115cdf0e10cSrcweir [property] long QueryTimeOut; 116cdf0e10cSrcweir 117cdf0e10cSrcweir 118cdf0e10cSrcweir /** returns the maximum number of bytes allowed for any column value. 119cdf0e10cSrcweir 120cdf0e10cSrcweir <p> 121cdf0e10cSrcweir This limit is the maximum number of bytes that can be returned 122cdf0e10cSrcweir for any column value. The limit applies only to 123cdf0e10cSrcweir <member scope= "com::sun::star::sdbc">DataType::BINARY</member> 124cdf0e10cSrcweir , 125cdf0e10cSrcweir <member scope= "com::sun::star::sdbc">DataType::VARBINARY</member> 126cdf0e10cSrcweir , 127cdf0e10cSrcweir <member scope= "com::sun::star::sdbc">DataType::LONGVARBINARY</member> 128cdf0e10cSrcweir , 129cdf0e10cSrcweir <member scope= "com::sun::star::sdbc">DataType::CHAR</member> 130cdf0e10cSrcweir , 131cdf0e10cSrcweir <member scope= "com::sun::star::sdbc">DataType::VARCHAR</member> 132cdf0e10cSrcweir , 133cdf0e10cSrcweir and 134cdf0e10cSrcweir <member scope= "com::sun::star::sdbc">DataType::LONGVARCHAR</member> 135cdf0e10cSrcweir columns. 136cdf0e10cSrcweir If the limit is exceeded, the excess data is silently discarded. 137cdf0e10cSrcweir <br/> 138cdf0e10cSrcweir There is no limitation, if set to zero. 139cdf0e10cSrcweir </p> 140cdf0e10cSrcweir */ 141cdf0e10cSrcweir [property] long MaxFieldSize; 142cdf0e10cSrcweir 143cdf0e10cSrcweir 144cdf0e10cSrcweir /** retrieves the maximum number of rows that a ResultSet can contain. 145cdf0e10cSrcweir If the limit is exceeded, the excess rows are silently dropped. 146cdf0e10cSrcweir <br/> 147cdf0e10cSrcweir There is no limitation, if set to zero. 148cdf0e10cSrcweir */ 149cdf0e10cSrcweir [property] long MaxRows; 150cdf0e10cSrcweir 151cdf0e10cSrcweir 152cdf0e10cSrcweir /** defines the SQL cursor name that will be used by subsequent Statement 153cdf0e10cSrcweir <code>execute</code> 154cdf0e10cSrcweir methods. 155cdf0e10cSrcweir 156cdf0e10cSrcweir <p> 157cdf0e10cSrcweir This name can then be used in SQL positioned update/delete statements to 158cdf0e10cSrcweir identify the current row in the ResultSet generated by this statement. If 159cdf0e10cSrcweir the database does not support positioned update/delete, this property is 160cdf0e10cSrcweir a noop. To insure that a cursor has the proper isolation level to support 161cdf0e10cSrcweir updates, the cursor's SELECT statement should be of the form 162cdf0e10cSrcweir 'select for update ...'. If the 'for update' phrase is omitted, 163cdf0e10cSrcweir positioned updates may fail. 164cdf0e10cSrcweir </p> 165cdf0e10cSrcweir <p> 166cdf0e10cSrcweir <b> 167cdf0e10cSrcweir Note: 168cdf0e10cSrcweir </b> 169cdf0e10cSrcweir By definition, positioned update/delete 170cdf0e10cSrcweir execution must be done by a different Statement than the one 171cdf0e10cSrcweir which generated the ResultSet being used for positioning. Also, 172cdf0e10cSrcweir cursor names must be unique within a connection. 173cdf0e10cSrcweir </p> 174cdf0e10cSrcweir */ 175cdf0e10cSrcweir [property] string CursorName; 176cdf0e10cSrcweir 177cdf0e10cSrcweir 178cdf0e10cSrcweir /** retrieves the result set concurrency. 179cdf0e10cSrcweir 180cdf0e10cSrcweir @see com::sun::star::sdbc::ResultSetConcurrency 181cdf0e10cSrcweir */ 182cdf0e10cSrcweir [property] long ResultSetConcurrency; 183cdf0e10cSrcweir 184cdf0e10cSrcweir 185cdf0e10cSrcweir /** determine the result set type. 186cdf0e10cSrcweir 187cdf0e10cSrcweir @see com::sun::star::sdbc::ResultSetType 188cdf0e10cSrcweir */ 189cdf0e10cSrcweir [property] long ResultSetType; 190cdf0e10cSrcweir 191cdf0e10cSrcweir 192cdf0e10cSrcweir /** retrieves the direction for fetching rows from database tables 193cdf0e10cSrcweir that is the default for result sets generated from this 194cdf0e10cSrcweir <code>Statement</code> 195cdf0e10cSrcweir object. 196cdf0e10cSrcweir <br/> 197cdf0e10cSrcweir If this 198cdf0e10cSrcweir <code>Statement</code> 199cdf0e10cSrcweir object has not set a fetch direction, 200cdf0e10cSrcweir the return value is implementation-specific. 201cdf0e10cSrcweir */ 202cdf0e10cSrcweir [property] long FetchDirection; 203cdf0e10cSrcweir 204cdf0e10cSrcweir 205cdf0e10cSrcweir /** retrieves the number of result set rows that is the default fetch size 206cdf0e10cSrcweir for result sets generated from this 207cdf0e10cSrcweir <code>Statement</code> 208cdf0e10cSrcweir object. 209cdf0e10cSrcweir <br/> 210cdf0e10cSrcweir If this 211cdf0e10cSrcweir <code>Statement</code> 212cdf0e10cSrcweir object has not set a fetch size, 213cdf0e10cSrcweir the return value is implementation-specific. 214cdf0e10cSrcweir */ 215cdf0e10cSrcweir [property] long FetchSize; 216cdf0e10cSrcweir 217cdf0e10cSrcweir 218cdf0e10cSrcweir /** returns if escape processing is on or off. 219cdf0e10cSrcweir If escape scanning is on (the default), the driver will do 220cdf0e10cSrcweir escape substitution before sending the SQL to the database. 221cdf0e10cSrcweir */ 222cdf0e10cSrcweir [property] boolean EscapeProcessing; 223cdf0e10cSrcweir}; 224cdf0e10cSrcweir 225cdf0e10cSrcweir//============================================================================= 226cdf0e10cSrcweir 227cdf0e10cSrcweir}; }; }; }; 228cdf0e10cSrcweir 229cdf0e10cSrcweir#endif 230