/src/serenity/Userland/Libraries/LibSQL/Key.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2021, Jan de Visser <jan@de-visser.net> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <AK/RefPtr.h> |
10 | | #include <LibSQL/Forward.h> |
11 | | #include <LibSQL/Meta.h> |
12 | | #include <LibSQL/Tuple.h> |
13 | | |
14 | | namespace SQL { |
15 | | |
16 | | class Key : public Tuple { |
17 | | public: |
18 | 0 | Key() = default; |
19 | | explicit Key(NonnullRefPtr<TupleDescriptor> const&); |
20 | | explicit Key(NonnullRefPtr<IndexDef>); |
21 | | Key(NonnullRefPtr<TupleDescriptor> const&, Serializer&); |
22 | | Key(RefPtr<IndexDef>, Serializer&); |
23 | 0 | RefPtr<IndexDef> index() const { return m_index; } |
24 | | |
25 | | private: |
26 | | RefPtr<IndexDef> m_index { nullptr }; |
27 | | }; |
28 | | |
29 | | } |