Go to the source code of this file.
Classes | |
struct | DateTime |
Defines | |
#define | getValue sqlite3AtoF |
Typedefs | |
typedef struct DateTime | DateTime |
Functions | |
static int | getDigits (const char *zDate,...) |
static int | parseTimezone (const char *zDate, DateTime *p) |
static int | parseHhMmSs (const char *zDate, DateTime *p) |
static void | computeJD (DateTime *p) |
static int | parseYyyyMmDd (const char *zDate, DateTime *p) |
static void | setDateTimeToCurrent (sqlite3_context *context, DateTime *p) |
static int | parseDateOrTime (sqlite3_context *context, const char *zDate, DateTime *p) |
static void | computeYMD (DateTime *p) |
static void | computeHMS (DateTime *p) |
static void | computeYMD_HMS (DateTime *p) |
static void | clearYMD_HMS_TZ (DateTime *p) |
static int | localtimeOffset (DateTime *p) |
static int | parseModifier (const char *zMod, DateTime *p) |
static int | isDate (sqlite3_context *context, int argc, sqlite3_value **argv, DateTime *p) |
static void | juliandayFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
static void | datetimeFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
static void | timeFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
static void | dateFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
static void | strftimeFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
static void | ctimeFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
static void | cdateFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
static void | ctimestampFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
void | sqlite3RegisterDateTimeFunctions (void) |
#define getValue sqlite3AtoF |
Definition at line 143 of file date.c.
Referenced by parseDateOrTime(), and parseModifier().
static void cdateFunc | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv | |||
) | [static] |
Definition at line 982 of file date.c.
References dateFunc().
Referenced by sqlite3RegisterDateTimeFunctions().
static void clearYMD_HMS_TZ | ( | DateTime * | p | ) | [static] |
Definition at line 420 of file date.c.
References DateTime::validHMS, DateTime::validTZ, and DateTime::validYMD.
Referenced by parseModifier().
static void computeHMS | ( | DateTime * | p | ) | [static] |
Definition at line 394 of file date.c.
References computeJD(), DateTime::h, DateTime::iJD, DateTime::m, DateTime::s, and DateTime::validHMS.
Referenced by computeYMD_HMS(), and timeFunc().
static void computeJD | ( | DateTime * | p | ) | [static] |
Definition at line 238 of file date.c.
References DateTime::D, DateTime::h, DateTime::iJD, DateTime::m, DateTime::M, DateTime::s, DateTime::tz, DateTime::validHMS, DateTime::validJD, DateTime::validTZ, DateTime::validYMD, and DateTime::Y.
Referenced by computeHMS(), juliandayFunc(), localtimeOffset(), parseModifier(), parseYyyyMmDd(), and strftimeFunc().
static void computeYMD | ( | DateTime * | p | ) | [static] |
Definition at line 368 of file date.c.
References DateTime::D, DateTime::iJD, DateTime::M, DateTime::validJD, DateTime::validYMD, and DateTime::Y.
Referenced by computeYMD_HMS(), dateFunc(), and parseModifier().
static void computeYMD_HMS | ( | DateTime * | p | ) | [static] |
Definition at line 412 of file date.c.
References computeHMS(), and computeYMD().
Referenced by datetimeFunc(), localtimeOffset(), parseModifier(), and strftimeFunc().
static void ctimeFunc | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv | |||
) | [static] |
Definition at line 969 of file date.c.
References timeFunc().
Referenced by sqlite3RegisterDateTimeFunctions().
static void ctimestampFunc | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv | |||
) | [static] |
Definition at line 995 of file date.c.
References datetimeFunc().
Referenced by sqlite3RegisterDateTimeFunctions().
static void dateFunc | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv | |||
) | [static] |
Definition at line 810 of file date.c.
References computeYMD(), DateTime::D, isDate(), DateTime::M, sqlite3_result_text(), sqlite3_snprintf(), SQLITE_TRANSIENT, and DateTime::Y.
Referenced by cdateFunc(), and sqlite3RegisterDateTimeFunctions().
static void datetimeFunc | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv | |||
) | [static] |
Definition at line 771 of file date.c.
References computeYMD_HMS(), DateTime::D, DateTime::h, isDate(), DateTime::m, DateTime::M, DateTime::s, sqlite3_result_text(), sqlite3_snprintf(), SQLITE_TRANSIENT, and DateTime::Y.
Referenced by ctimestampFunc(), and sqlite3RegisterDateTimeFunctions().
static int getDigits | ( | const char * | zDate, | |
... | ||||
) | [static] |
Definition at line 103 of file date.c.
Referenced by parseHhMmSs(), parseTimezone(), and parseYyyyMmDd().
static int isDate | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv, | |||
DateTime * | p | |||
) | [static] |
Definition at line 713 of file date.c.
References DateTime::iJD, parseDateOrTime(), parseModifier(), setDateTimeToCurrent(), sqlite3_value_double(), sqlite3_value_text(), sqlite3_value_type(), SQLITE_FLOAT, SQLITE_INTEGER, and DateTime::validJD.
Referenced by dateFunc(), datetimeFunc(), juliandayFunc(), strftimeFunc(), and timeFunc().
static void juliandayFunc | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv | |||
) | [static] |
Definition at line 754 of file date.c.
References computeJD(), DateTime::iJD, isDate(), and sqlite3_result_double().
Referenced by sqlite3RegisterDateTimeFunctions().
static int localtimeOffset | ( | DateTime * | p | ) | [static] |
Definition at line 432 of file date.c.
References computeJD(), computeYMD_HMS(), DateTime::D, DateTime::h, DateTime::iJD, DateTime::m, DateTime::M, DateTime::s, sqlite3_mutex_enter, sqlite3_mutex_leave, sqlite3MutexAlloc, SQLITE_MUTEX_STATIC_MASTER, DateTime::tz, DateTime::validHMS, DateTime::validJD, DateTime::validTZ, DateTime::validYMD, and DateTime::Y.
Referenced by parseModifier().
static int parseDateOrTime | ( | sqlite3_context * | context, | |
const char * | zDate, | |||
DateTime * | p | |||
) | [static] |
Definition at line 343 of file date.c.
References getValue, DateTime::iJD, parseHhMmSs(), parseYyyyMmDd(), setDateTimeToCurrent(), sqlite3IsNumber(), sqlite3StrICmp(), SQLITE_UTF8, and DateTime::validJD.
Referenced by isDate().
static int parseHhMmSs | ( | const char * | zDate, | |
DateTime * | p | |||
) | [static] |
Definition at line 196 of file date.c.
References getDigits(), DateTime::h, DateTime::m, parseTimezone(), DateTime::s, DateTime::tz, DateTime::validHMS, DateTime::validJD, and DateTime::validTZ.
Referenced by parseDateOrTime(), parseModifier(), and parseYyyyMmDd().
static int parseModifier | ( | const char * | zMod, | |
DateTime * | p | |||
) | [static] |
Definition at line 518 of file date.c.
References clearYMD_HMS_TZ(), computeJD(), computeYMD(), computeYMD_HMS(), DateTime::D, getValue, DateTime::h, DateTime::iJD, localtimeOffset(), DateTime::M, DateTime::m, parseHhMmSs(), DateTime::s, DateTime::validHMS, DateTime::validJD, DateTime::validTZ, and DateTime::Y.
Referenced by isDate().
static int parseTimezone | ( | const char * | zDate, | |
DateTime * | p | |||
) | [static] |
Definition at line 161 of file date.c.
References getDigits(), and DateTime::tz.
Referenced by parseHhMmSs().
static int parseYyyyMmDd | ( | const char * | zDate, | |
DateTime * | p | |||
) | [static] |
Definition at line 284 of file date.c.
References computeJD(), DateTime::D, getDigits(), DateTime::M, parseHhMmSs(), DateTime::validHMS, DateTime::validJD, DateTime::validTZ, DateTime::validYMD, and DateTime::Y.
Referenced by parseDateOrTime().
static void setDateTimeToCurrent | ( | sqlite3_context * | context, | |
DateTime * | p | |||
) | [static] |
Definition at line 319 of file date.c.
References db, DateTime::iJD, sqlite3::pVfs, sqlite3_context_db_handle(), sqlite3OsCurrentTime(), and DateTime::validJD.
Referenced by isDate(), and parseDateOrTime().
void sqlite3RegisterDateTimeFunctions | ( | void | ) |
Definition at line 1055 of file date.c.
References ArraySize, cdateFunc(), ctimeFunc(), ctimestampFunc(), dateFunc(), datetimeFunc(), FUNCTION, GLOBAL, juliandayFunc(), sqlite3FuncDefInsert(), sqlite3GlobalFunctions, SQLITE_WSD, STR_FUNCTION, strftimeFunc(), and timeFunc().
Referenced by sqlite3RegisterGlobalFunctions().
static void strftimeFunc | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv | |||
) | [static] |
Definition at line 843 of file date.c.
References sqlite3::aLimit, computeJD(), computeYMD_HMS(), DateTime::D, db, DateTime::h, DateTime::iJD, isDate(), DateTime::m, DateTime::M, DateTime::s, sqlite3_context_db_handle(), sqlite3_result_error_nomem(), sqlite3_result_error_toobig(), sqlite3_result_text(), sqlite3_snprintf(), sqlite3_value_text(), sqlite3DbMallocRaw(), SQLITE_DYNAMIC, SQLITE_LIMIT_LENGTH, SQLITE_TRANSIENT, DateTime::validJD, and DateTime::Y.
Referenced by sqlite3RegisterDateTimeFunctions().
static void timeFunc | ( | sqlite3_context * | context, | |
int | argc, | |||
sqlite3_value ** | argv | |||
) | [static] |
Definition at line 791 of file date.c.
References computeHMS(), DateTime::h, isDate(), DateTime::m, DateTime::s, sqlite3_result_text(), sqlite3_snprintf(), and SQLITE_TRANSIENT.
Referenced by ctimeFunc(), and sqlite3RegisterDateTimeFunctions().
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:58 2011 by Doxygen 1.6.1