merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / sdbc / KeyRule.idl
blob08806abccf94ac4a0ed3c7656b638829aec13a49
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_sdbc_KeyRule_idl__
28 #define __com_sun_star_sdbc_KeyRule_idl__
30 module com { module sun { module star { module sdbc {
33 /** determines the rules for foreign key constraints.
35 published constants KeyRule
38 /** a possible value for the column's
39 <code>UPDATE_RULE</code>
40 and
41 <code>DELETE_RULE</code>
42 in the
43 <type scope="com::sun::star::sdbc">XResultSet</type>
44 objects returned by the methods
45 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
47 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
49 and
50 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
52 <P>
53 For the column
54 <code>UPDATE_RULE</code>
56 it indicates that
57 when the primary key is updated, the foreign key (imported key)
58 is changed to agree with it.
59 </P>
60 <P>
61 For the column
62 <code>DELETE_RULE</code>
64 it indicates that
65 when the primary key is deleted, rows that imported that key
66 are deleted.
67 </P>
69 const long CASCADE = 0;
70 //-------------------------------------------------------------------------
72 /** a possible value for the column's
73 <code>UPDATE_RULE</code>
74 and
75 <code>DELETE_RULE</code>
76 in the
77 <type scope="com::sun::star::sdbc">XResultSet</type>
78 objects returned by the methods
79 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
81 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
83 and
84 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
86 <P>
87 For the column
88 <code>UPDATE_RULE</code>
89 , it indicates that
90 a primary key may not be updated if it has been imported by
91 another table as a foreign key.
92 </P>
93 <P>
94 For the column
95 <code>DELETE_RULE</code>
96 , it indicates that
97 a primary key may not be deleted if it has been imported by
98 another table as a foreign key.
99 </P>
101 const long RESTRICT = 1;
102 //-------------------------------------------------------------------------
104 /** a possible value for the column's
105 <code>UPDATE_RULE</code>
107 <code>DELETE_RULE</code>
108 in the
109 <type scope="com::sun::star::sdbc">XResultSet</type>
110 objects returned by the methods
111 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
113 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
116 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
119 For the columns
120 <code>UPDATE_RULE</code>
122 <code>DELETE_RULE</code>
124 it indicates that
125 when the primary key is updated or deleted, the foreign key (imported key)
126 is changed to <code>NULL</code>.
127 </P>
129 const long SET_NULL = 2;
130 //-------------------------------------------------------------------------
132 /** a possible value for the column's
133 <code>UPDATE_RULE</code>
135 <code>DELETE_RULE</code>
136 in the
137 <type scope="com::sun::star::sdbc">XResultSet</type>
138 objects returned by the methods
139 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
141 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
144 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
147 For the columns
148 <code>UPDATE_RULE</code>
150 <code>DELETE_RULE</code>
152 it indicates that if the primary key has been imported, it cannot be updated or deleted.
153 </P>
155 const long NO_ACTION = 3;
156 //-------------------------------------------------------------------------
158 /** a possible value for the column's
159 <code>UPDATE_RULE</code>
161 <code>DELETE_RULE</code>
162 in the
163 <type scope="com::sun::star::sdbc">XResultSet</type>
164 objects returned by the methods
165 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
167 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
170 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
173 For the columns
174 <code>UPDATE_RULE</code>
176 <code>DELETE_RULE</code>
178 it indicates that
179 if the primary key is updated or deleted, the foreign key (imported key)
180 is set to the default value.
181 </P>
183 const long SET_DEFAULT = 4;
186 //=============================================================================
188 }; }; }; };
190 /*===========================================================================
191 ===========================================================================*/
192 #endif