Xmipp  v3.23.11-Nereus
Classes | Typedefs | Functions
xmipp_program_sql.h File Reference
#include "sqlite3.h"
#include "argsprinter.h"
#include "xmipp_filename.h"
#include "metadata_label.h"
#include "metadata_static.h"
Include dependency graph for xmipp_program_sql.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ProgramDb
 

Typedefs

typedef std::map< const char *, StringDictDB
 

Functions

StringescapeSqliteStr (String &str)
 

Typedef Documentation

◆ DictDB

typedef std::map<const char*, String> DictDB

Definition at line 35 of file xmipp_program_sql.h.

Function Documentation

◆ escapeSqliteStr()

String& escapeSqliteStr ( String str)

Definition at line 97 of file xmipp_program_sql.cpp.

98 {
99  size_t pos = 0;
100  while ((pos = str.find_first_of("'", pos)) != String::npos)
101  {
102  str.replace(pos, 1, "''");
103  pos += 2;
104  }
105  str = "'" + str + "'";
106  return str;
107 }