OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::core::create_schemas_fn Struct Reference

Function object to create database schemas. More...

#include <schema.hpp>

Public Member Functions

void operator() (connection_ptr const &conn) const
void operator() (std::filesystem::path const &db_path) const

Detailed Description

Function object to create database schemas.

This functor provides two operator() overloads to create database schemas. The first overload accepts a connection pointer and creates the necessary schemas in the connected database. The second overload accepts a filesystem path to a database file, connects to the database, and creates the necessary schemas. The schemas include tables for objects and references, ensuring that the database is properly structured for use in the oxy core library.

Member Function Documentation

◆ operator()() [1/2]

void oxy::core::create_schemas_fn::operator() ( connection_ptr const & conn) const
Parameters
conn- A pointer to the database (container) connection in which to create the schemas.

◆ operator()() [2/2]

void oxy::core::create_schemas_fn::operator() ( std::filesystem::path const & db_path) const
Parameters
db_path- The filesystem path to the database file in which to create the schemas.