OmniSciDB  16c4e035a1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SqliteConnector.cpp File Reference
#include "SqliteConnector.h"
#include <iostream>
#include "Logger/Logger.h"
+ Include dependency graph for SqliteConnector.cpp:

Go to the source code of this file.


std::string get_column_datum (int column_type, sqlite3_stmt *stmt, size_t column_index)

Detailed Description

Todd Mostak

Definition in file SqliteConnector.cpp.

Function Documentation

std::string get_column_datum ( int  column_type,
sqlite3_stmt *  stmt,
size_t  column_index 

Definition at line 60 of file SqliteConnector.cpp.

Referenced by SqliteConnector::query_with_text_params().

60  {
61  const char* datum_ptr;
62  if (column_type == SQLITE_BLOB) {
63  datum_ptr = static_cast<const char*>(sqlite3_column_blob(stmt, column_index));
64  } else {
65  datum_ptr = reinterpret_cast<const char*>(sqlite3_column_text(stmt, column_index));
66  }
67  size_t datum_size = sqlite3_column_bytes(stmt, column_index);
68  return {datum_ptr, datum_size};
69 }

+ Here is the caller graph for this function: