From 3ed61fd5a5885c8308dbbe651e6a9d780e5a2cd7 Mon Sep 17 00:00:00 2001 From: "Dr. Patrick Urbanke" Date: Wed, 19 Mar 2025 07:12:38 +0100 Subject: [PATCH] Added the execute command --- include/Connection.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/Connection.hpp b/include/Connection.hpp index b52b85e..7d7ce32 100644 --- a/include/Connection.hpp +++ b/include/Connection.hpp @@ -5,6 +5,7 @@ #include #include "Result.hpp" +#include "dynamic/CreateTable.hpp" #include "dynamic/Insert.hpp" #include "dynamic/SelectFrom.hpp" @@ -13,6 +14,10 @@ namespace sqlgen { /// Abstract base class to be implemented by the different /// database connections. struct Connection { + /// Executes a statement. + /// TODO: Abstract away the different statements using a lambda function. + virtual Result execute(const CreateTable& _stmt) = 0; + /// Reads the results of a SelectFrom statement. virtual Result>> read( const dynamic::SelectFrom& _query) = 0;