Skip to content

Commit

Permalink
removed todo tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Jul 10, 2022
1 parent 9162c5a commit 6115648
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion include/orm/tiny/tinybuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ namespace Orm::Tiny
inline Model &getModel();
/*! Get the underlying query builder instance. */
inline QueryBuilder &getQuery() const;
// TODO now fix revisit silverqx
/*! Get the underlying query builder instance as a std::shared_ptr. */
inline const std::shared_ptr<QueryBuilder> &
getQuerySharedPointer() const;
Expand Down
4 changes: 2 additions & 2 deletions src/orm/query/querybuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,10 @@ Builder &Builder::setBindings(QVector<QVariant> &&bindings, const BindingType ty

/* Other methods */

// TODO next revisit std::shared_ptr, after few weeks I'm pretty sure that this can/should be std::unique_pre, like in the TinyBuilder, I need to check if more instances need to save this pointer at once, if don't then I have to change it silverqx
std::shared_ptr<Builder> Builder::newQuery() const
{
/* It has to be the shared pointer because it is returned to the user so instances
counting is necessary, also saved internally eg. in the TinyBuilder::m_query. */
return std::make_shared<Builder>(m_connection, m_grammar);
}

Expand All @@ -771,7 +772,6 @@ Expression Builder::raw(const QVariant &value) const
return m_connection.raw(value);
}

// TODO now, (still need to be revisited) it can be reference, shared owner will be callee, and copy will be made during m_wheres.append() silverqx
Builder &Builder::addNestedWhereQuery(const std::shared_ptr<Builder> &query,
const QString &condition)
{
Expand Down

0 comments on commit 6115648

Please sign in to comment.