tdf#154285 Check upper bound of arguments in SbRtl_Minute function
[LibreOffice.git] / offapi / com / sun / star / sdbc / KeyRule.idl
blob45e3da3792b8caad014c4a7bc3023ab2daac7b16
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 {
23 /** determines the rules for foreign key constraints.
25 published constants KeyRule
28 /** a possible value for the column's
29 <code>UPDATE_RULE</code>
30 and
31 <code>DELETE_RULE</code>
32 in the
33 com::sun::star::sdbc::XResultSet
34 objects returned by the methods
35 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
36 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
37 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
38 <P>
39 For the column
40 <code>UPDATE_RULE</code>
42 it indicates that
43 when the primary key is updated, the foreign key (imported key)
44 is changed to agree with it.
45 </P>
46 <P>
47 For the column
48 <code>DELETE_RULE</code>
50 it indicates that
51 when the primary key is deleted, rows that imported that key
52 are deleted.
53 </P>
55 const long CASCADE = 0;
57 /** a possible value for the column's
58 <code>UPDATE_RULE</code>
59 and
60 <code>DELETE_RULE</code>
61 in the
62 com::sun::star::sdbc::XResultSet
63 objects returned by the methods
64 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
65 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
66 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
67 <P>
68 For the column
69 <code>UPDATE_RULE</code>
70 , it indicates that
71 a primary key may not be updated if it has been imported by
72 another table as a foreign key.
73 </P>
74 <P>
75 For the column
76 <code>DELETE_RULE</code>
77 , it indicates that
78 a primary key may not be deleted if it has been imported by
79 another table as a foreign key.
80 </P>
82 const long RESTRICT = 1;
84 /** a possible value for the column's
85 <code>UPDATE_RULE</code>
86 and
87 <code>DELETE_RULE</code>
88 in the
89 com::sun::star::sdbc::XResultSet
90 objects returned by the methods
91 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
92 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
93 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
94 <P>
95 For the columns
96 <code>UPDATE_RULE</code>
97 and
98 <code>DELETE_RULE</code>
100 it indicates that
101 when the primary key is updated or deleted, the foreign key (imported key)
102 is changed to <code>NULL</code>.
103 </P>
105 const long SET_NULL = 2;
107 /** a possible value for the column's
108 <code>UPDATE_RULE</code>
110 <code>DELETE_RULE</code>
111 in the
112 com::sun::star::sdbc::XResultSet
113 objects returned by the methods
114 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
115 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
116 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
118 For the columns
119 <code>UPDATE_RULE</code>
121 <code>DELETE_RULE</code>
123 it indicates that if the primary key has been imported, it cannot be updated or deleted.
124 </P>
126 const long NO_ACTION = 3;
128 /** a possible value for the column's
129 <code>UPDATE_RULE</code>
131 <code>DELETE_RULE</code>
132 in the
133 com::sun::star::sdbc::XResultSet
134 objects returned by the methods
135 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
136 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
137 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
139 For the columns
140 <code>UPDATE_RULE</code>
142 <code>DELETE_RULE</code>
144 it indicates that
145 if the primary key is updated or deleted, the foreign key (imported key)
146 is set to the default value.
147 </P>
149 const long SET_DEFAULT = 4;
153 }; }; }; };
155 /*===========================================================================
156 ===========================================================================*/
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */