relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::migrations::Migration Class Reference

Container for migration operations. More...

#include <relx/migrations/core.hpp>

Public Member Functions

 Migration (std::string name)
 
template<typename Op , typename... Args>
void add_operation (Args &&... args)
 Add an operation to the migration.
 
MigrationResult< std::vector< std::string > > forward_sql () const
 Generate forward migration SQL.
 
MigrationResult< std::vector< std::string > > rollback_sql () const
 Generate rollback migration SQL.
 
const std::string & name () const
 Get migration name.
 
bool empty () const
 Check if migration is empty.
 
size_t size () const
 Get number of operations.
 

Detailed Description

Container for migration operations.

Definition at line 332 of file core.hpp.

Constructor & Destructor Documentation

◆ Migration()

relx::migrations::Migration::Migration ( std::string  name)
inlineexplicit

Definition at line 338 of file core.hpp.

Member Function Documentation

◆ add_operation()

template<typename Op , typename... Args>
void relx::migrations::Migration::add_operation ( Args &&...  args)
inline

Add an operation to the migration.

Definition at line 342 of file core.hpp.

◆ empty()

bool relx::migrations::Migration::empty ( ) const
inline

Check if migration is empty.

Definition at line 381 of file core.hpp.

◆ forward_sql()

MigrationResult< std::vector< std::string > > relx::migrations::Migration::forward_sql ( ) const
inline

Generate forward migration SQL.

Definition at line 347 of file core.hpp.

◆ name()

const std::string & relx::migrations::Migration::name ( ) const
inline

Get migration name.

Definition at line 378 of file core.hpp.

◆ rollback_sql()

MigrationResult< std::vector< std::string > > relx::migrations::Migration::rollback_sql ( ) const
inline

Generate rollback migration SQL.

Definition at line 362 of file core.hpp.

◆ size()

size_t relx::migrations::Migration::size ( ) const
inline

Get number of operations.

Definition at line 384 of file core.hpp.


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