2021-06-17 13:47:42 -04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Jan de Visser <jan@de-visser.net>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/RefPtr.h>
|
|
|
|
#include <LibSQL/Forward.h>
|
|
|
|
#include <LibSQL/Tuple.h>
|
|
|
|
|
|
|
|
namespace SQL {
|
|
|
|
|
|
|
|
class Key : public Tuple {
|
|
|
|
public:
|
2021-08-18 20:50:13 -04:00
|
|
|
Key() = default;
|
2021-07-13 13:47:08 -04:00
|
|
|
explicit Key(NonnullRefPtr<TupleDescriptor> const&);
|
|
|
|
explicit Key(NonnullRefPtr<IndexDef>);
|
2021-08-18 20:50:13 -04:00
|
|
|
Key(NonnullRefPtr<TupleDescriptor> const&, Serializer&);
|
|
|
|
Key(RefPtr<IndexDef>, Serializer&);
|
2021-06-17 13:47:42 -04:00
|
|
|
RefPtr<IndexDef> index() const { return m_index; }
|
|
|
|
|
|
|
|
private:
|
2021-07-13 13:47:08 -04:00
|
|
|
RefPtr<IndexDef> m_index { nullptr };
|
2021-06-17 13:47:42 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|