Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / sdbc / XClob.idl
blobbc0d2bc81f0ccc7ce98a52523efafcb742fbd5e8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_sdbc_XClob_idl__
20 #define __com_sun_star_sdbc_XClob_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 module com { module sun { module star { module io {
25 published interface XInputStream;
26 };};};};
28 #include <com/sun/star/sdbc/SQLException.idl>
30 module com { module sun { module star { module sdbc {
33 /** is the mapping for the SQL
34 <code>CLOB</code>
35 type.
38 <p>
39 A SQL
40 <code>CLOB</code>
41 is a built-in type
42 that stores a Character Large Object as a column value in a row of
43 a database table.
44 The driver implements a
45 <code>Clob</code>
46 object using a SQL
47 <code>locator(CLOB)</code>
48 , which means that a
49 <code>Clob</code>
50 object
51 contains a logical pointer to the SQL
52 <code>CLOB</code>
53 data rather than
54 the data itself. A
55 <code>Clob</code>
56 object is valid for the duration
57 of the transaction in which it was created.
58 </p>
59 <p>
60 The
61 <code>Clob</code>
62 interface provides methods for getting the
63 length of a SQL
64 <code>CLOB</code>
65 (Character Large Object) value,
66 for materializing a
67 <code>CLOB</code>
68 value on the client, and for
69 searching for a substring or
70 <code>CLOB</code>
71 object within a
72 <code>CLOB</code>
73 value.
74 </p>
75 <p>
76 Methods in the interfaces
77 com::sun::star::sdbc::XResultSet
79 and
80 com::sun::star::sdbc::XPreparedStatement
81 , such as
82 <code>getClob</code>
83 and
84 <code>setClob</code>
85 allow a programmer to access the SQL <code>CLOB</code>.
86 </p>
88 published interface XClob: com::sun::star::uno::XInterface
91 /** returns the number of characters in the
92 <code>CLOB</code>
93 value
94 designated by this
95 <code>Clob</code>
96 object.
97 @returns
98 the length of the CLOB object
99 @throws SQLException
100 if a database access error occurs.
102 hyper length() raises (SQLException);
105 /** returns a copy of the specified substring in the
106 <code>Clob</code>
107 value
108 designated by this
109 <code>Clob</code>
110 object.
114 The substring begins at position <code>pos</code> and has up
116 <code>length</code>
117 consecutive characters.
118 </p>
119 @param pos
120 the starting position
121 @param length
122 the length of the substring
123 @returns
124 the substring
125 @throws SQLException
126 if a database access error occurs.
128 string getSubString([in]hyper pos, [in]long length) raises (SQLException);
131 /** gets the
132 <code>Clob</code>
133 contents as a stream.
134 @returns
135 the stream
136 @throws SQLException
137 if a database access error occurs.
139 com::sun::star::io::XInputStream getCharacterStream() raises (SQLException);
142 /** determines the character position at which the specified substring
143 <code>searchstr</code>
144 appears in the
145 <code>Clob</code>.
146 The search begins at position <code>start</code>.
148 @param searchstr
149 the string to search
150 @param start
151 the starting position
152 @returns
153 the length of the CLOB object
154 @throws SQLException
155 if a database access error occurs.
157 hyper position([in]string searchstr, [in]long start)
158 raises (SQLException);
161 /** determines the position at which the specified
162 <code>Clob</code>
163 object
164 <code>pattern</code>
165 appears in this
166 <code>Clob</code>
167 object.
168 The search begins at position <code>start</code>.
169 @param pattern
170 the CLOB to search
171 @param start
172 the starting position
173 @returns
174 the position of the CLOB inside
175 @throws SQLException
176 if a database access error occurs.
178 hyper positionOfClob([in]XClob pattern, [in]hyper start)
179 raises (SQLException);
183 }; }; }; };
185 /*===========================================================================
186 ===========================================================================*/
187 #endif
189 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */