diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-02-09 17:09:26 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-02-10 12:20:35 +0000 |
commit | f2fae3a21c7bfed5387797980ee6be971dec4070 (patch) | |
tree | 14ce83005b458bc15499726c1de0287463d35546 /Userland/Libraries | |
parent | 70cdd05172af8c816ed4ca3e08fcca52352d1efb (diff) | |
download | serenity-f2fae3a21c7bfed5387797980ee6be971dec4070.zip |
LibSQL: Do not return copies of vectors from table/index definitions
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibSQL/Meta.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibSQL/Meta.h b/Userland/Libraries/LibSQL/Meta.h index 29c89e6f98..1258bb68cd 100644 --- a/Userland/Libraries/LibSQL/Meta.h +++ b/Userland/Libraries/LibSQL/Meta.h @@ -110,7 +110,7 @@ class IndexDef : public Relation { public: ~IndexDef() override = default; - NonnullRefPtrVector<KeyPartDef> key_definition() const { return m_key_definition; } + NonnullRefPtrVector<KeyPartDef> const& key_definition() const { return m_key_definition; } bool unique() const { return m_unique; } [[nodiscard]] size_t size() const { return m_key_definition.size(); } void append_column(String, SQLType, Order = Order::Ascending); @@ -138,8 +138,8 @@ public: void append_column(Key const&); size_t num_columns() { return m_columns.size(); } size_t num_indexes() { return m_indexes.size(); } - NonnullRefPtrVector<ColumnDef> columns() const { return m_columns; } - NonnullRefPtrVector<IndexDef> indexes() const { return m_indexes; } + NonnullRefPtrVector<ColumnDef> const& columns() const { return m_columns; } + NonnullRefPtrVector<IndexDef> const& indexes() const { return m_indexes; } [[nodiscard]] NonnullRefPtr<TupleDescriptor> to_tuple_descriptor() const; static NonnullRefPtr<IndexDef> index_def(); |