added iOS source code
[wl-app.git] / iOS / Pods / Realm / include / core / realm / column_type.hpp
1 /*************************************************************************
2  *
3  * Copyright 2016 Realm Inc.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  **************************************************************************/
18
19 #ifndef REALM_COLUMN_TYPE_HPP
20 #define REALM_COLUMN_TYPE_HPP
21
22 namespace realm {
23
24
25 // Note: Enumeration value assignments must be kept in sync with
26 // <realm/data_type.hpp>.
27 enum ColumnType {
28     // Column types
29     col_type_Int = 0,
30     col_type_Bool = 1,
31     col_type_String = 2,
32     col_type_StringEnum = 3, // double refs
33     col_type_Binary = 4,
34     col_type_Table = 5,
35     col_type_Mixed = 6,
36     col_type_OldDateTime = 7,
37     col_type_Timestamp = 8,
38     col_type_Float = 9,
39     col_type_Double = 10,
40     col_type_Reserved4 = 11, // Decimal
41     col_type_Link = 12,
42     col_type_LinkList = 13,
43     col_type_BackLink = 14
44 };
45
46
47 // Column attributes can be combined using bitwise or.
48 enum ColumnAttr {
49     col_attr_None = 0,
50     col_attr_Indexed = 1,
51
52     /// Specifies that this column forms a unique constraint. It requires
53     /// `col_attr_Indexed`.
54     col_attr_Unique = 2,
55
56     /// Reserved for future use.
57     col_attr_Reserved = 4,
58
59     /// Specifies that the links of this column are strong, not weak. Applies
60     /// only to link columns (`type_Link` and `type_LinkList`).
61     col_attr_StrongLinks = 8,
62
63     /// Specifies that elements in the column can be null.
64     col_attr_Nullable = 16
65 };
66
67
68 } // namespace realm
69
70 #endif // REALM_COLUMN_TYPE_HPP