NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
sqlite3-statement.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_UTIL_SQLITE3_STATEMENT_HPP
23
#define NDN_UTIL_SQLITE3_STATEMENT_HPP
24
25
#include "../encoding/block.hpp"
26
#include <string>
27
28
struct
sqlite3;
29
struct
sqlite3_stmt;
30
31
namespace
ndn
{
32
namespace
util {
33
38
class
Sqlite3Statement
: noncopyable
39
{
40
public
:
47
Sqlite3Statement
(sqlite3* database,
const
std::string& statement);
48
52
~Sqlite3Statement
();
53
63
int
64
bind
(
int
index,
const
char
*
value
,
size_t
size,
void
(*destructor)(
void
*));
65
74
int
75
bind
(
int
index,
const
std::string& value,
void
(*destructor)(
void
*));
76
86
int
87
bind
(
int
index,
const
void
* value,
size_t
size,
void
(*destructor)(
void
*));
88
97
int
98
bind
(
int
index,
const
Block
& block,
void
(*destructor)(
void
*));
99
107
int
108
bind
(
int
index,
int
number);
109
113
std::string
114
getString
(
int
column);
115
119
Block
120
getBlock
(
int
column);
121
125
int
126
getInt
(
int
column);
127
131
const
uint8_t*
132
getBlob
(
int
column);
133
137
int
138
getSize
(
int
column);
139
143
int
144
step
();
145
149
operator
sqlite3_stmt*();
150
151
private
:
152
sqlite3_stmt* m_stmt;
153
};
154
155
}
// namespace util
156
}
// namespace ndn
157
158
#endif // NDN_UTIL_SQLITE3_STATEMENT_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::util::Sqlite3Statement::getSize
int getSize(int column)
get the size of column.
Definition:
sqlite3-statement.cpp:99
ndn::util::Sqlite3Statement::~Sqlite3Statement
~Sqlite3Statement()
finalize the statement
Definition:
sqlite3-statement.cpp:29
ndn::Block
Represents a TLV element of NDN packet format.
Definition:
block.hpp:42
ndn::util::Sqlite3Statement::Sqlite3Statement
Sqlite3Statement(sqlite3 *database, const std::string &statement)
initialize and prepare Sqlite3 statement
Definition:
sqlite3-statement.cpp:34
ndn::util::Sqlite3Statement::getBlock
Block getBlock(int column)
get a block from column.
Definition:
sqlite3-statement.cpp:79
ndn::util::Sqlite3Statement::getBlob
const uint8_t * getBlob(int column)
get a pointer of byte blob from column.
Definition:
sqlite3-statement.cpp:93
ndn::util::Sqlite3Statement::bind
int bind(int index, const char *value, size_t size, void(*destructor)(void *))
bind a string to the statement
Definition:
sqlite3-statement.cpp:42
ndn::util::Sqlite3Statement::getString
std::string getString(int column)
get a string from column.
Definition:
sqlite3-statement.cpp:72
ndn::util::Sqlite3Statement::step
int step()
wrapper of sqlite3_step
Definition:
sqlite3-statement.cpp:105
ndn::util::Sqlite3Statement
wrap an SQLite3 prepared statement
Definition:
sqlite3-statement.hpp:38
ndn::util::Sqlite3Statement::getInt
int getInt(int column)
get an integer from column.
Definition:
sqlite3-statement.cpp:86
websocketpp::session::state::value
value
Definition:
connection.hpp:179
ndnSIM
ndn-cxx
src
util
sqlite3-statement.hpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11