OmniSciDB  2e3a973ef4
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.

Functions

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

Detailed Description

Author
Todd Mostak todd@.nosp@m.mapd.nosp@m..com

Definition in file SqliteConnector.cpp.

Function Documentation

◆ get_column_datum()

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: