Serenity Operating System
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
14namespace SQL {
15
16class Key : public Tuple {
17public:
18 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 RefPtr<IndexDef> index() const { return m_index; }
24
25private:
26 RefPtr<IndexDef> m_index { nullptr };
27};
28
29}