1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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
38 close a statement's current ResultSet if an open one exists.
41 published
interface XStatement
: com
::sun
::star
::uno
::XInterface
44 /** executes a SQL statement that returns a single ResultSet.
46 the SQL statement which should be executed
48 a ResultSet that contains the data produced by the query; never `NULL`
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,
59 a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
61 either the row count for INSERT, UPDATE or DELETE or 0 for SQL statements that return nothing
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.
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.
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).
94 `TRUE` if the next result is a ResultSet; `FALSE` if it is an update count or there are no more results
96 if a database access error occurs.
98 boolean execute
([in]string sql
) raises
(SQLException
);
101 com::sun::star::sdbc::Connection
104 <code>Statement</code>
107 the connection that produced this statement
110 if a database access error occurs.
112 XConnection getConnection
() raises
(SQLException
);
118 /*===========================================================================
119 ===========================================================================*/
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */