Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
orbit::orm::MigrationRunner< DbClient > Class Template Reference

#include <MigrationRunner.hpp>

Static Public Member Functions

static concurrency::Awaitable< MigrationResult > run (std::shared_ptr< DbClient > db, std::string migrations_dir)
 Applies the pending migrations in migrations_dir over a connected client, with no HTTP involved: for start-up code, a migrate command or tests.
 
static concurrency::Task run_migrations (std::shared_ptr< DbClient > db, std::string migrations_dir, std::shared_ptr< http::ResponseWriter > res)
 run(), answered over HTTP: 200 with the summary, or a 500 whose details go to the log only.
 

Static Public Attributes

static constexpr long long kAdvisoryLockKey = 0x6f72626974
 

Member Function Documentation

◆ run()

template<typename DbClient >
static concurrency::Awaitable< MigrationResult > orbit::orm::MigrationRunner< DbClient >::run ( std::shared_ptr< DbClient >  db,
std::string  migrations_dir 
)
inlinestatic

Applies the pending migrations in migrations_dir over a connected client, with no HTTP involved: for start-up code, a migrate command or tests.

A missing directory is not an error (nothing to apply).

◆ run_migrations()

template<typename DbClient >
static concurrency::Task orbit::orm::MigrationRunner< DbClient >::run_migrations ( std::shared_ptr< DbClient >  db,
std::string  migrations_dir,
std::shared_ptr< http::ResponseWriter >  res 
)
inlinestatic

run(), answered over HTTP: 200 with the summary, or a 500 whose details go to the log only.

Member Data Documentation

◆ kAdvisoryLockKey

template<typename DbClient >
constexpr long long orbit::orm::MigrationRunner< DbClient >::kAdvisoryLockKey = 0x6f72626974
staticconstexpr

The documentation for this class was generated from the following file: