CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
reflog_sql.cc File Reference
#include "reflog_sql.h"
#include <cassert>
#include <limits>
#include "util/string.h"
Include dependency graph for reflog_sql.cc:

Go to the source code of this file.

Macros

#define DB_FIELDS_V1R0   "hash, type, timestamp"
 
#define DB_PLACEHOLDERS   ":hash, :type, :timestamp"
 
#define MAKE_STATEMENT(STMT_TMPL, REV)
 
#define MAKE_STATEMENTS(STMT_TMPL)   MAKE_STATEMENT(STMT_TMPL, V1R0)
 
#define DEFERRED_INIT(DB, REV)   DeferredInit((DB)->sqlite_db(), (REV).c_str())
 
#define DEFERRED_INITS(DB)   DEFERRED_INIT((DB), V1R0)
 

Macro Definition Documentation

#define DB_FIELDS_V1R0   "hash, type, timestamp"

Definition at line 54 of file reflog_sql.cc.

#define DB_PLACEHOLDERS   ":hash, :type, :timestamp"

Definition at line 55 of file reflog_sql.cc.

#define DEFERRED_INIT (   DB,
  REV 
)    DeferredInit((DB)->sqlite_db(), (REV).c_str())

Definition at line 67 of file reflog_sql.cc.

#define DEFERRED_INITS (   DB)    DEFERRED_INIT((DB), V1R0)

Definition at line 70 of file reflog_sql.cc.

Referenced by SqlInsertReference::SqlInsertReference().

#define MAKE_STATEMENT (   STMT_TMPL,
  REV 
)
Value:
static const std::string REV = \
ReplaceAll(STMT_TMPL, \
"@DB_FIELDS@", DB_FIELDS_ ## REV), \
"@DB_PLACEHOLDERS@", DB_PLACEHOLDERS)
string ReplaceAll(const string &haystack, const string &needle, const string &replace_by)
Definition: string.cc:502
#define DB_PLACEHOLDERS
Definition: reflog_sql.cc:55

Definition at line 57 of file reflog_sql.cc.

#define MAKE_STATEMENTS (   STMT_TMPL)    MAKE_STATEMENT(STMT_TMPL, V1R0)

Definition at line 64 of file reflog_sql.cc.

Referenced by SqlInsertReference::SqlInsertReference().