A sqlite function context.
More...
#include <sqlcontext.h>
|
| SqlContext (sqlite3_context *ctx, int argc, sqlite3_value **argv) |
| Constructs an SqlContext.
|
|
void * | getUserData () const |
| Gets the pointer to the user data for the context.
|
|
const std::vector< SqlValue > & | getArgs () const |
| Gets the list of SqlValue arguments passed to the function.
|
|
void | result () |
| Returns a NULL value from the sql function.
|
|
void | result (int value) |
| Returns an int value from the sql function.
|
|
void | result (sqlite3_int64 value) |
| Returns an int64 value from the sql function.
|
|
void | result (double value) |
| Returns a double value from the sql function.
|
|
void | result (bool value) |
| Returns a bool value from the sql function.
|
|
void | result (const std::string &value) |
| Returns a string value from the sql function.
|
|
void | result (void *value, int n) |
| Returns a blob value from the sql function.
|
|
void | error (const std::string &err) |
| Returns an error from the sql function.
|
|
void | error (int err) |
| Returns an error from the sql function.
|
|
A sqlite function context.
◆ SqlContext()
Nickvision::Database::SqlContext::SqlContext |
( |
sqlite3_context * | ctx, |
|
|
int | argc, |
|
|
sqlite3_value ** | argv ) |
Constructs an SqlContext.
- Parameters
-
ctx | sqlite3_context* |
argc | The number of arguments passed to the context |
argv | The sqlite3_value*'s passed to the context |
◆ error() [1/2]
void Nickvision::Database::SqlContext::error |
( |
const std::string & | err | ) |
|
Returns an error from the sql function.
- Parameters
-
◆ error() [2/2]
void Nickvision::Database::SqlContext::error |
( |
int | err | ) |
|
Returns an error from the sql function.
- Parameters
-
◆ getArgs()
const std::vector< SqlValue > & Nickvision::Database::SqlContext::getArgs |
( |
| ) |
const |
Gets the list of SqlValue arguments passed to the function.
- Returns
- The list of arguments
◆ getUserData()
void * Nickvision::Database::SqlContext::getUserData |
( |
| ) |
const |
Gets the pointer to the user data for the context.
- Returns
- The user data pointer
◆ result() [1/7]
void Nickvision::Database::SqlContext::result |
( |
| ) |
|
Returns a NULL value from the sql function.
◆ result() [2/7]
void Nickvision::Database::SqlContext::result |
( |
bool | value | ) |
|
Returns a bool value from the sql function.
- Parameters
-
value | The bool value to return |
◆ result() [3/7]
void Nickvision::Database::SqlContext::result |
( |
const std::string & | value | ) |
|
Returns a string value from the sql function.
- Parameters
-
value | The string value to return |
◆ result() [4/7]
void Nickvision::Database::SqlContext::result |
( |
double | value | ) |
|
Returns a double value from the sql function.
- Parameters
-
value | The double value to return |
◆ result() [5/7]
void Nickvision::Database::SqlContext::result |
( |
int | value | ) |
|
Returns an int value from the sql function.
- Parameters
-
value | The int value to return |
◆ result() [6/7]
void Nickvision::Database::SqlContext::result |
( |
sqlite3_int64 | value | ) |
|
Returns an int64 value from the sql function.
- Parameters
-
value | The int64 value to return |
◆ result() [7/7]
void Nickvision::Database::SqlContext::result |
( |
void * | value, |
|
|
int | n ) |
Returns a blob value from the sql function.
- Parameters
-
value | The blob value to return |
n | The size of the blob value |
The documentation for this class was generated from the following file: