Futuresql
threadeddatabase.h
28/// If the required one is not included, use the DatabaseConfiguration::setType QString overload instead.
43 /// Set the name of the database driver. If it is included in DatabaseType, use the enum overload instead
80constexpr bool isQVariantConvertible = std::conjunction_v<std::is_convertible<Args, QVariant>...>;
96 static std::unique_ptr<ThreadedDatabase> establishConnection(const DatabaseConfiguration &config);
113 /// The subdirectories need to be named so that when sorted alphabetically the migrations will be run in the correct order.
122 /// Declare that the database is currently at the state of the migration in the migration subdirectory
125 /// The automatic migrations will then start with all migrations that are newer than migrationName.
127 /// @warning This function should only be used for the initial switch from a different migration system, for example a custom made one.
140 /// and a, if the column types are not the same types in the same order as the attributes of the struct,
161 /// \brief Run a custom function on the database thread. The function is passed the internal QSqlDatabase.
auto getResults(const QString &sqlQuery, Args... args) -> QFuture< std::vector< T > >
Execute an SQL query on the database, retrieving the result.
Definition threadeddatabase.h:145
auto execute(const QString &sqlQuery, Args... args) -> QFuture< void >
Execute an SQL query on the database, ignoring the result.
Definition threadeddatabase.h:106
auto runOnThread(Func &&func) -> QFuture< std::invoke_result_t< Func, const QSqlDatabase & > >
Run a custom function on the database thread.
Definition threadeddatabase.h:167
auto getResult(const QString &sqlQuery, Args... args) -> QFuture< std::optional< T > >
Like getResults, but for retrieving just one row.
Definition threadeddatabase.h:156
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.