Get the style color and number just once
[LibreOffice.git] / offapi / com / sun / star / sdbc / XStatement.idl
blobaa5915f33b71e82ed915b51bce5b560aed296dcd
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 .
20 module com { module sun { module star { module sdbc {
22 published interface XConnection;
23 published interface XResultSet;
26 /** is used for executing a static SQL statement and obtaining the results
27 produced by it.
31 <p>
32 Only one ResultSet per Statement can be open at any point in
33 time; therefore, if the reading of one ResultSet is interleaved
34 with the reading of another, each must have been generated by
35 different Statements. All statement
36 <code>execute</code>
37 methods implicitly
38 close a statement's current ResultSet if an open one exists.
39 </p>
41 published interface XStatement: com::sun::star::uno::XInterface
44 /** executes a SQL statement that returns a single ResultSet.
45 @param sql
46 the SQL statement which should be executed
47 @returns
48 a ResultSet that contains the data produced by the query; never `NULL`
49 @throws SQLException
50 if a database access error occurs.
52 XResultSet executeQuery([in]string sql) raises (SQLException);
54 /** executes an SQL INSERT, UPDATE, or DELETE statement. In addition,
55 SQL statements that return nothing, such as SQL DDL statements,
56 can be executed.
58 @param sql
59 a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
60 @returns
61 either the row count for INSERT, UPDATE or DELETE or 0 for SQL statements that return nothing
62 @throws SQLException
63 if a database access error occurs.
65 long executeUpdate([in]string sql) raises (SQLException);
67 /** executes a SQL statement that may return multiple results.
70 <p>
71 Under some (uncommon) situations a single SQL statement may return
72 multiple result sets and/or update counts. Normally you can ignore
73 this unless you are (1) executing a stored procedure that you know may
74 return multiple results or (2) you are dynamically executing an
75 unknown SQL string. The navigation through multiple results is covered by
76 com::sun::star::sdbc::XMultipleResults.
77 </p>
78 <p>
79 The
80 <code>execute</code>
81 method executes a SQL statement and indicates
82 the form of the first result. You can then use
83 com::sun::star::sdbc::XMultipleResults::getResultSet()
85 com::sun::star::sdbc::XMultipleResults::getUpdateCount()
86 to retrieve the result, and
87 com::sun::star::sdbc::XMultipleResults::getMoreResults()
88 to move to any subsequent result(s).
89 </p>
91 @param sql
92 any SQL statement
93 @returns
94 `TRUE` if the next result is a ResultSet; `FALSE` if it is an update count or there are no more results
95 @throws SQLException
96 if a database access error occurs.
98 boolean execute([in]string sql) raises (SQLException);
100 /** returns the
101 com::sun::star::sdbc::Connection
102 object
103 that produced this
104 <code>Statement</code>
105 object.
106 @returns
107 the connection that produced this statement
109 @throws SQLException
110 if a database access error occurs.
112 XConnection getConnection() raises (SQLException);
116 }; }; }; };
118 /*===========================================================================
119 ===========================================================================*/
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */