Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / sdbc / KeyRule.idl
blob30eae77a6559c3e8ba0367f50ecfe818732d2d86
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_KeyRule_idl__
20 #define __com_sun_star_sdbc_KeyRule_idl__
22 module com { module sun { module star { module sdbc {
25 /** determines the rules for foreign key constraints.
27 published constants KeyRule
30 /** a possible value for the column's
31 <code>UPDATE_RULE</code>
32 and
33 <code>DELETE_RULE</code>
34 in the
35 com::sun::star::sdbc::XResultSet
36 objects returned by the methods
37 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
38 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
39 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
40 <P>
41 For the column
42 <code>UPDATE_RULE</code>
44 it indicates that
45 when the primary key is updated, the foreign key (imported key)
46 is changed to agree with it.
47 </P>
48 <P>
49 For the column
50 <code>DELETE_RULE</code>
52 it indicates that
53 when the primary key is deleted, rows that imported that key
54 are deleted.
55 </P>
57 const long CASCADE = 0;
59 /** a possible value for the column's
60 <code>UPDATE_RULE</code>
61 and
62 <code>DELETE_RULE</code>
63 in the
64 com::sun::star::sdbc::XResultSet
65 objects returned by the methods
66 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
67 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
68 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
69 <P>
70 For the column
71 <code>UPDATE_RULE</code>
72 , it indicates that
73 a primary key may not be updated if it has been imported by
74 another table as a foreign key.
75 </P>
76 <P>
77 For the column
78 <code>DELETE_RULE</code>
79 , it indicates that
80 a primary key may not be deleted if it has been imported by
81 another table as a foreign key.
82 </P>
84 const long RESTRICT = 1;
86 /** a possible value for the column's
87 <code>UPDATE_RULE</code>
88 and
89 <code>DELETE_RULE</code>
90 in the
91 com::sun::star::sdbc::XResultSet
92 objects returned by the methods
93 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
94 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
95 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
96 <P>
97 For the columns
98 <code>UPDATE_RULE</code>
99 and
100 <code>DELETE_RULE</code>
102 it indicates that
103 when the primary key is updated or deleted, the foreign key (imported key)
104 is changed to <code>NULL</code>.
105 </P>
107 const long SET_NULL = 2;
109 /** a possible value for the column's
110 <code>UPDATE_RULE</code>
112 <code>DELETE_RULE</code>
113 in the
114 com::sun::star::sdbc::XResultSet
115 objects returned by the methods
116 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
117 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
118 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
120 For the columns
121 <code>UPDATE_RULE</code>
123 <code>DELETE_RULE</code>
125 it indicates that if the primary key has been imported, it cannot be updated or deleted.
126 </P>
128 const long NO_ACTION = 3;
130 /** a possible value for the column's
131 <code>UPDATE_RULE</code>
133 <code>DELETE_RULE</code>
134 in the
135 com::sun::star::sdbc::XResultSet
136 objects returned by the methods
137 com::sun::star::sdbc::XDatabaseMetaData::getImportedKeys(),
138 com::sun::star::sdbc::XDatabaseMetaData::getExportedKeys(),
139 and com::sun::star::sdbc::XDatabaseMetaData::getCrossReference().
141 For the columns
142 <code>UPDATE_RULE</code>
144 <code>DELETE_RULE</code>
146 it indicates that
147 if the primary key is updated or deleted, the foreign key (imported key)
148 is set to the default value.
149 </P>
151 const long SET_DEFAULT = 4;
155 }; }; }; };
157 /*===========================================================================
158 ===========================================================================*/
159 #endif
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */