Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / sdbc / XResultSetUpdate.idl
bloba6f2ac576c0def169a328fd2183283d9b422e29a
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_XResultSetUpdate_idl__
20 #define __com_sun_star_sdbc_XResultSetUpdate_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/sdbc/SQLException.idl>
26 module com { module sun { module star { module sdbc {
29 /** provides the possibility to write changes made on a result set back to
30 database.
32 published interface XResultSetUpdate: com::sun::star::uno::XInterface
35 /** inserts the contents of the insert row into the result set and
36 the database. Must be on the insert row when this method is called.
37 @throws SQLException
38 if a database access error occurs.
40 void insertRow() raises (SQLException);
42 /** updates the underlying database with the new contents of the
43 current row. Cannot be called when on the insert row.
44 @throws SQLException
45 if a database access error occurs.
47 void updateRow() raises (SQLException);
49 /** deletes the current row from the result set and the underlying
50 database. Cannot be called when on the insert row.
51 @throws SQLException
52 if a database access error occurs.
54 void deleteRow() raises (SQLException);
56 /** cancels the updates made to a row.
59 <p>
60 This method may be called after calling an
61 <code>updateXXX</code>
62 method(s) and before calling
63 com::sun::star::sdbc::XResultSetUpdate::updateRow()
64 to rollback the updates made to a row. If no updates have been made or
65 <code>updateRow</code>
66 has already been called, then this method has no
67 effect.
68 </p>
69 @throws SQLException
70 if a database access error occurs.
72 void cancelRowUpdates() raises (SQLException);
74 /** moves the cursor to the insert row. The current cursor position is
75 remembered while the cursor is positioned on the insert row.
78 <p>
79 The insert row is a special row associated with an updatable
80 result set. It is essentially a buffer where a new row may
81 be constructed by calling the
82 <code>updateXXX</code>
83 methods prior to
84 inserting the row into the result set.
85 </p>
86 <p>
87 Only the
88 <code>updateXXX</code>
90 <code>getXXX</code>
92 and
93 com::sun::star::sdbc::XResultSetUpdate::insertRow()
94 methods may be
95 called when the cursor is on the insert row. All of the columns in
96 a result set must be given a value each time this method is
97 called before calling
98 <code>insertRow</code>
99 . The method
100 <code>updateXXX</code>
101 must be called before a
102 <code>getXXX</code>
103 method can be called on a column value.
104 </p>
105 @throws SQLException
106 if a database access error occurs.
108 void moveToInsertRow() raises (SQLException);
110 /** moves the cursor to the remembered cursor position, usually the
111 current row. This method has no effect if the cursor is not on the insert
112 row.
113 @throws SQLException
114 if a database access error occurs.
116 void moveToCurrentRow() raises (SQLException);
120 }; }; }; };
122 /*===========================================================================
123 ===========================================================================*/
124 #endif
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */