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

ADD CONSTRAINT migration operation. More...

#include <relx/migrations/constraint_operations.hpp>

Inheritance diagram for relx::migrations::AddConstraintOperation:
relx::migrations::MigrationOperation

Public Member Functions

 AddConstraintOperation (std::string table_name, const ConstraintMetadata &constraint)
 
MigrationResult< std::string > to_sql () const override
 
MigrationResult< std::string > rollback_sql () const override
 
OperationType type () const override
 
- Public Member Functions inherited from relx::migrations::MigrationOperation
virtual ~MigrationOperation ()=default
 
virtual MigrationResult< std::vector< std::string > > bind_params () const
 
virtual MigrationResult< std::vector< std::string > > rollback_bind_params () const
 

Detailed Description

ADD CONSTRAINT migration operation.

Definition at line 11 of file constraint_operations.hpp.

Constructor & Destructor Documentation

◆ AddConstraintOperation()

relx::migrations::AddConstraintOperation::AddConstraintOperation ( std::string  table_name,
const ConstraintMetadata constraint 
)
inline

Definition at line 17 of file constraint_operations.hpp.

Member Function Documentation

◆ rollback_sql()

MigrationResult< std::string > relx::migrations::AddConstraintOperation::rollback_sql ( ) const
inlineoverridevirtual

Implements relx::migrations::MigrationOperation.

Definition at line 35 of file constraint_operations.hpp.

◆ to_sql()

MigrationResult< std::string > relx::migrations::AddConstraintOperation::to_sql ( ) const
inlineoverridevirtual

Implements relx::migrations::MigrationOperation.

Definition at line 20 of file constraint_operations.hpp.

◆ type()

OperationType relx::migrations::AddConstraintOperation::type ( ) const
inlineoverridevirtual

Implements relx::migrations::MigrationOperation.

Definition at line 51 of file constraint_operations.hpp.


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