1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:47:34 +00:00

LibSQL: Fix minor const-correctness issues

This commit is contained in:
Andreas Kling 2023-02-19 23:22:46 +01:00
parent 0cdd227e9b
commit 65710bf3f7
3 changed files with 5 additions and 5 deletions

View file

@ -39,7 +39,7 @@ static DeprecatedString result_column_name(ResultColumn const& column, size_t co
ResultOr<ResultSet> Select::execute(ExecutionContext& context) const ResultOr<ResultSet> Select::execute(ExecutionContext& context) const
{ {
NonnullRefPtrVector<ResultColumn> columns; NonnullRefPtrVector<ResultColumn const> columns;
Vector<DeprecatedString> column_names; Vector<DeprecatedString> column_names;
auto const& result_column_list = this->result_column_list(); auto const& result_column_list = this->result_column_list();

View file

@ -170,7 +170,7 @@ ResultOr<NonnullRefPtr<TableDef>> Database::get_table(DeprecatedString const& sc
return table_def; return table_def;
} }
ErrorOr<Vector<Row>> Database::select_all(TableDef const& table) ErrorOr<Vector<Row>> Database::select_all(TableDef& table)
{ {
VERIFY(m_table_cache.get(table.key().hash()).has_value()); VERIFY(m_table_cache.get(table.key().hash()).has_value());
Vector<Row> ret; Vector<Row> ret;
@ -180,7 +180,7 @@ ErrorOr<Vector<Row>> Database::select_all(TableDef const& table)
return ret; return ret;
} }
ErrorOr<Vector<Row>> Database::match(TableDef const& table, Key const& key) ErrorOr<Vector<Row>> Database::match(TableDef& table, Key const& key)
{ {
VERIFY(m_table_cache.get(table.key().hash()).has_value()); VERIFY(m_table_cache.get(table.key().hash()).has_value());
Vector<Row> ret; Vector<Row> ret;

View file

@ -41,8 +41,8 @@ public:
static Key get_table_key(DeprecatedString const&, DeprecatedString const&); static Key get_table_key(DeprecatedString const&, DeprecatedString const&);
ResultOr<NonnullRefPtr<TableDef>> get_table(DeprecatedString const&, DeprecatedString const&); ResultOr<NonnullRefPtr<TableDef>> get_table(DeprecatedString const&, DeprecatedString const&);
ErrorOr<Vector<Row>> select_all(TableDef const&); ErrorOr<Vector<Row>> select_all(TableDef&);
ErrorOr<Vector<Row>> match(TableDef const&, Key const&); ErrorOr<Vector<Row>> match(TableDef&, Key const&);
ErrorOr<void> insert(Row&); ErrorOr<void> insert(Row&);
ErrorOr<void> remove(Row&); ErrorOr<void> remove(Row&);
ErrorOr<void> update(Row&); ErrorOr<void> update(Row&);