From 046cdae1a14a686238ab91b1f883335b2de5a78c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 1 Jun 2021 00:17:38 +0100 Subject: Generate DbStmt templates from .sql files m4 generator and related code. Reshuffles some CTF stuff to avoid pulling in all of CTF and iostream for its fixed_string. Moves CTF out of AdHoc namespace. Add some initial SQL statements. --- lib/dbStmt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/dbStmt.h') diff --git a/lib/dbStmt.h b/lib/dbStmt.h index 3e98b34..81621de 100644 --- a/lib/dbStmt.h +++ b/lib/dbStmt.h @@ -1,7 +1,7 @@ #ifndef MYGRATE_DBSTMT_H #define MYGRATE_DBSTMT_H -#include +#include "fixedString.h" #include #include #include @@ -12,7 +12,7 @@ namespace MyGrate { class DbConn; enum class ParamMode { None, DollarNum, QMark }; - template class DbStmt { + template class DbStmt { public: // This don't account for common table expressions, hopefully won't need those :) static constexpr auto isSelect {S.v().starts_with("SELECT") || S.v().starts_with("SHOW") -- cgit v1.2.3