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 sdbcx
{
23 /** is used to identify rows within a result set and to find rows by a bookmark.
27 Bookmarks are only valid in the scope of the current result set and
28 are not interchangeable between result sets. A bookmark could be a complex data
29 structure, so it could not be compared in a safe way. Because of that, a provider
30 has to implement the compare method for bookmarks.
33 published
interface XRowLocate
: com
::sun
::star
::uno
::XInterface
36 /** returns the bookmark of the current row of a result set.
39 @throws com::sun::star::sdbc::SQLException
40 if a database access error occurs.
42 any getBookmark
() raises
(com
::sun
::star
::sdbc
::SQLException
);
44 /** moves the cursor to the row identified by a valid bookmark.
47 If the bookmark could not be located, a result set will be positioned
48 after the last record.
50 If the bookmark is invalid, or not generated by the current result set, then
51 the behavior is not defined, even an abnormal termination is possible.
54 the bookmark where to move
57 @throws com::sun::star::sdbc::SQLException
58 if a database access error occurs.
60 boolean moveToBookmark
([in]any bookmark
) raises
(com
::sun
::star
::sdbc
::SQLException
);
62 /** moves the cursor a relative number of rows, either positive or negative
63 starting at a given bookmark position.
67 If the bookmark could not be located, a result set will be positioned
68 after the last record.
70 If the bookmark is invalid, or not generated by the current result set, then
71 the behavior is not defined, even an abnormal termination is possible.
74 the bookmark where to move
76 count of rows move relative to the bookmark
79 @throws com::sun::star::sdbc::SQLException
80 if a database access error occurs.
82 boolean moveRelativeToBookmark
([in]any bookmark
, [in]long rows
)
83 raises
(com
::sun
::star
::sdbc
::SQLException
);
85 /** compares two bookmarks and returns an indication of their relative values.
88 The bookmarks must apply to the same ResultSet. You cannot reliably
89 compare bookmarks from different ResultSets, even if they were created from
90 the same source or statement.
92 A bookmark that is not valid, or incorrectly formed, will cause an exception.
99 a value of com::sun::star::sdbcx::CompareBookmark
100 @throws com::sun::star::sdbc::SQLException
101 if a database access error occurs.
103 @see com::sun::star::sdbcx::CompareBookmark
106 long compareBookmarks
([in]any first
, [in]any second
)
107 raises
(com
::sun
::star
::sdbc
::SQLException
);
109 /** determines whether the bookmarks of a result set are ordered or not.
112 @throws com::sun::star::sdbc::SQLException
113 if a database access error occurs.
114 @see com::sun::star::sdbcx::CompareBookmark
116 boolean hasOrderedBookmarks
() raises
(com
::sun
::star
::sdbc
::SQLException
);
118 /** returns the hash value for a specified bookmark.
123 @throws com::sun::star::sdbc::SQLException
124 if a database access error occurs.
126 long hashBookmark
([in]any bookmark
) raises
(com
::sun
::star
::sdbc
::SQLException
);
132 /*===========================================================================
133 ===========================================================================*/
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */