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_XClob_idl__ 24cdf0e10cSrcweir#define __com_sun_star_sdbc_XClob_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir module com { module sun { module star { module io { 31cdf0e10cSrcweir published interface XInputStream; 32cdf0e10cSrcweir};};};}; 33cdf0e10cSrcweir 34cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_SQLException_idl__ 35cdf0e10cSrcweir#include <com/sun/star/sdbc/SQLException.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir module com { module sun { module star { module sdbc { 39cdf0e10cSrcweir 40cdf0e10cSrcweir 41cdf0e10cSrcweir/** is the mapping for the SQL 42cdf0e10cSrcweir <code>CLOB</code> 43cdf0e10cSrcweir type. 44cdf0e10cSrcweir 45cdf0e10cSrcweir 46cdf0e10cSrcweir <p> 47cdf0e10cSrcweir A SQL 48cdf0e10cSrcweir <code>CLOB</code> 49cdf0e10cSrcweir is a built-in type 50cdf0e10cSrcweir that stores a Character Large Object as a column value in a row of 51cdf0e10cSrcweir a database table. 52cdf0e10cSrcweir The driver implements a 53cdf0e10cSrcweir <code>Clob</code> 54cdf0e10cSrcweir object using a SQL 55cdf0e10cSrcweir <code>locator(CLOB)</code> 56cdf0e10cSrcweir , which means that a 57cdf0e10cSrcweir <code>Clob</code> 58cdf0e10cSrcweir object 59cdf0e10cSrcweir contains a logical pointer to the SQL 60cdf0e10cSrcweir <code>CLOB</code> 61cdf0e10cSrcweir data rather than 62cdf0e10cSrcweir the data itself. A 63cdf0e10cSrcweir <code>Clob</code> 64cdf0e10cSrcweir object is valid for the duration 65cdf0e10cSrcweir of the transaction in which it was created. 66cdf0e10cSrcweir </p> 67cdf0e10cSrcweir <p> 68cdf0e10cSrcweir The 69cdf0e10cSrcweir <code>Clob</code> 70cdf0e10cSrcweir interface provides methods for getting the 71cdf0e10cSrcweir length of a SQL 72cdf0e10cSrcweir <code>CLOB</code> 73cdf0e10cSrcweir (Character Large Object) value, 74cdf0e10cSrcweir for materializing a 75cdf0e10cSrcweir <code>CLOB</code> 76cdf0e10cSrcweir value on the client, and for 77cdf0e10cSrcweir searching for a substring or 78cdf0e10cSrcweir <code>CLOB</code> 79cdf0e10cSrcweir object within a 80cdf0e10cSrcweir <code>CLOB</code> 81cdf0e10cSrcweir value. 82cdf0e10cSrcweir </p> 83cdf0e10cSrcweir <p> 84cdf0e10cSrcweir Methods in the interfaces 85cdf0e10cSrcweir <type scope="com::sun::star::sdbc">XResultSet</type> 86cdf0e10cSrcweir , 87cdf0e10cSrcweir and 88cdf0e10cSrcweir <type scope="com::sun::star::sdbc">XPreparedStatement</type> 89cdf0e10cSrcweir , such as 90cdf0e10cSrcweir <code>getClob</code> 91cdf0e10cSrcweir and 92cdf0e10cSrcweir <code>setClob</code> 93cdf0e10cSrcweir allow a programmer to 94cdf0e10cSrcweir access the SQL 95cdf0e10cSrcweir <code>CLOB</code> 96cdf0e10cSrcweir . 97cdf0e10cSrcweir </p> 98cdf0e10cSrcweir */ 99cdf0e10cSrcweirpublished interface XClob: com::sun::star::uno::XInterface 100cdf0e10cSrcweir{ 101cdf0e10cSrcweir //------------------------------------------------------------------------- 102cdf0e10cSrcweir 103cdf0e10cSrcweir /** returns the number of characters in the 104cdf0e10cSrcweir <code>CLOB</code> 105cdf0e10cSrcweir value 106cdf0e10cSrcweir designated by this 107cdf0e10cSrcweir <code>Clob</code> 108cdf0e10cSrcweir object. 109cdf0e10cSrcweir @returns 110cdf0e10cSrcweir the length of the CLOB object 111cdf0e10cSrcweir @throws SQLException 112cdf0e10cSrcweir if a database access error occurs. 113cdf0e10cSrcweir */ 114cdf0e10cSrcweir hyper length() raises (SQLException); 115cdf0e10cSrcweir 116cdf0e10cSrcweir //------------------------------------------------------------------------- 117cdf0e10cSrcweir 118cdf0e10cSrcweir /** returns a copy of the specified substring in the 119cdf0e10cSrcweir <code>Clob</code> 120cdf0e10cSrcweir value 121cdf0e10cSrcweir designated by this 122cdf0e10cSrcweir <code>Clob</code> 123cdf0e10cSrcweir object. 124cdf0e10cSrcweir 125cdf0e10cSrcweir 126cdf0e10cSrcweir <p> 127cdf0e10cSrcweir The substring begins at position <code>pos</code> and has up 128cdf0e10cSrcweir to 129cdf0e10cSrcweir <code>length</code> 130cdf0e10cSrcweir consecutive characters. 131cdf0e10cSrcweir </p> 132cdf0e10cSrcweir @param pos 133cdf0e10cSrcweir the starting position 134cdf0e10cSrcweir @param length 135cdf0e10cSrcweir the length of the substring 136cdf0e10cSrcweir @returns 137cdf0e10cSrcweir the substring 138cdf0e10cSrcweir @throws SQLException 139cdf0e10cSrcweir if a database access error occurs. 140cdf0e10cSrcweir */ 141cdf0e10cSrcweir string getSubString([in]hyper pos, [in]long length) raises (SQLException); 142cdf0e10cSrcweir 143cdf0e10cSrcweir //------------------------------------------------------------------------- 144cdf0e10cSrcweir 145cdf0e10cSrcweir /** gets the 146cdf0e10cSrcweir <code>Clob</code> 147cdf0e10cSrcweir contents as a stream. 148cdf0e10cSrcweir @returns 149cdf0e10cSrcweir the stream 150cdf0e10cSrcweir @throws SQLException 151cdf0e10cSrcweir if a database access error occurs. 152cdf0e10cSrcweir */ 153cdf0e10cSrcweir com::sun::star::io::XInputStream getCharacterStream() raises (SQLException); 154cdf0e10cSrcweir 155cdf0e10cSrcweir //------------------------------------------------------------------------- 156cdf0e10cSrcweir 157cdf0e10cSrcweir /** determines the character position at which the specified substring 158cdf0e10cSrcweir <code>searchstr</code> 159cdf0e10cSrcweir appears in the 160cdf0e10cSrcweir <code>Clob</code> 161cdf0e10cSrcweir . The search begins at position 162cdf0e10cSrcweir <code>start</code> 163cdf0e10cSrcweir . 164cdf0e10cSrcweir @param searchstr 165cdf0e10cSrcweir the string to search 166cdf0e10cSrcweir @param start 167cdf0e10cSrcweir the starting position 168cdf0e10cSrcweir @returns 169cdf0e10cSrcweir the length of the CLOB object 170cdf0e10cSrcweir @throws SQLException 171cdf0e10cSrcweir if a database access error occurs. 172cdf0e10cSrcweir */ 173cdf0e10cSrcweir hyper position([in]string searchstr, [in]long start) 174cdf0e10cSrcweir raises (SQLException); 175cdf0e10cSrcweir 176cdf0e10cSrcweir //------------------------------------------------------------------------- 177cdf0e10cSrcweir 178cdf0e10cSrcweir /** determines the position at which the specified 179cdf0e10cSrcweir <code>Clob</code> 180cdf0e10cSrcweir object 181cdf0e10cSrcweir <code>pattern</code> 182cdf0e10cSrcweir appears in this 183cdf0e10cSrcweir <code>Clob</code> 184cdf0e10cSrcweir object. The search begins at position 185cdf0e10cSrcweir <code>start</code> 186cdf0e10cSrcweir . 187cdf0e10cSrcweir @param pattern 188cdf0e10cSrcweir the CLOB to search 189cdf0e10cSrcweir @param start 190cdf0e10cSrcweir the starting position 191cdf0e10cSrcweir @returns 192cdf0e10cSrcweir the position of the CLOB inside 193cdf0e10cSrcweir @throws SQLException 194cdf0e10cSrcweir if a database access error occurs. 195cdf0e10cSrcweir */ 196cdf0e10cSrcweir hyper positionOfClob([in]XClob pattern, [in]hyper start) 197cdf0e10cSrcweir raises (SQLException); 198cdf0e10cSrcweir}; 199cdf0e10cSrcweir 200cdf0e10cSrcweir//============================================================================= 201cdf0e10cSrcweir 202cdf0e10cSrcweir}; }; }; }; 203cdf0e10cSrcweir 204cdf0e10cSrcweir/*=========================================================================== 205cdf0e10cSrcweir===========================================================================*/ 206cdf0e10cSrcweir#endif 207