1 | /** |
2 | * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. |
3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. |
6 | * You may obtain a copy of the License at |
7 | * |
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
9 | * |
10 | * Unless required by applicable law or agreed to in writing, software |
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. |
15 | |
16 | * \author Haichao.chc |
17 | * \date Oct 2020 |
18 | * \brief Common types that will be used by all the project |
19 | */ |
20 | |
21 | #pragma once |
22 | |
23 | #include <limits> |
24 | #include <aitheta2/index_params.h> |
25 | |
26 | namespace proxima { |
27 | namespace be { |
28 | |
29 | /* |
30 | * Collection operation types |
31 | */ |
32 | enum class OperationTypes : uint32_t { |
33 | UNDEFINED = 0, |
34 | INSERT = 1, |
35 | UPDATE = 2, |
36 | DELETE = 3 |
37 | }; |
38 | |
39 | /* |
40 | * Column index types |
41 | */ |
42 | enum class IndexTypes : uint32_t { UNDEFINED = 0, PROXIMA_GRAPH_INDEX }; |
43 | |
44 | /* |
45 | * Column data types |
46 | */ |
47 | enum class DataTypes : uint32_t { |
48 | UNDEFINED = 0, |
49 | |
50 | BINARY = 1, |
51 | STRING = 2, |
52 | BOOL = 3, |
53 | INT32 = 4, |
54 | INT64 = 5, |
55 | UINT32 = 6, |
56 | UINT64 = 7, |
57 | FLOAT = 8, |
58 | DOUBLE = 9, |
59 | |
60 | VECTOR_BINARY32 = 20, |
61 | VECTOR_BINARY64 = 21, |
62 | VECTOR_FP16 = 22, |
63 | VECTOR_FP32 = 23, |
64 | VECTOR_FP64 = 24, |
65 | VECTOR_INT4 = 25, |
66 | VECTOR_INT8 = 26, |
67 | VECTOR_INT16 = 27 |
68 | }; |
69 | |
70 | /* |
71 | * Collection query types |
72 | */ |
73 | enum class QueryTypes : uint32_t { UNDEFINED = 0, KNN_QUERY, EQUAL_QUERY }; |
74 | |
75 | } // namespace be |
76 | } // end namespace proxima |
77 | |