|
libdsdb3
3.0
|
Functions | |
| char * | dsdb_bool_to_text (DSDB *dsdb, int bval, char *text) |
| Convert a boolean value to a database specific text string. | |
| int * | dsdb_text_to_bool (DSDB *dsdb, const char *text, int *bval) |
| Convert a database specific text string to a boolean value. | |
| char * | dsdb_time_to_text (DSDB *dsdb, time_t time, char *text) |
| Convert seconds since 1970 to a database specific time string. | |
| time_t * | dsdb_text_to_time (DSDB *dsdb, const char *text, time_t *time) |
| Convert a database specific time string to seconds since 1970. | |
| char * | dsdb_timeval_to_text (DSDB *dsdb, timeval_t *tval, char *text) |
| Convert a timeval to a database specific time string. | |
| timeval_t * | dsdb_text_to_timeval (DSDB *dsdb, const char *text, timeval_t *tval) |
| Convert a database specific time string to a timeval. | |
| char* dsdb_bool_to_text | ( | DSDB * | dsdb, |
| int | bval, | ||
| char * | text | ||
| ) |
Convert a boolean value to a database specific text string.
This function will convert a boolean value into a string that can be used in database queries.
| dsdb | - pointer to the database connection |
| bval | - boolean value (1 = TRUE, 0 = FALSE) |
| text | - output: text string |
| int* dsdb_text_to_bool | ( | DSDB * | dsdb, |
| const char * | text, | ||
| int * | bval | ||
| ) |
Convert a database specific text string to a boolean value.
This function will convert a boolean string returned by a database query into an integer (1 = TRUE, 0 = FALSE).
Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).
| dsdb | - pointer to the database connection |
| text | - text string |
| bval | - output: boolean value (1 = TRUE, 0 = FALSE) |
| time_t* dsdb_text_to_time | ( | DSDB * | dsdb, |
| const char * | text, | ||
| time_t * | time | ||
| ) |
Convert a database specific time string to seconds since 1970.
This function will convert a time string returned by a database query into seconds since 1970.
Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).
| dsdb | - pointer to the database connection |
| text | - time string |
| time | - output: seconds since 1970 |
Convert a database specific time string to a timeval.
This function will convert a time string returned by a database query into a timeval.
Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).
| dsdb | - pointer to the database connection |
| text | - time string |
| tval | - output: timeval (in seconds since 1970) |
| char* dsdb_time_to_text | ( | DSDB * | dsdb, |
| time_t | time, | ||
| char * | text | ||
| ) |
Convert seconds since 1970 to a database specific time string.
This function will convert seconds since 1970 into a time string that can be used in database queries.
The text argument must point to a string that can hold at least 32 characters.
Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).
| dsdb | - pointer to the database connection |
| time | - seconds since 1970 |
| text | - output: time string |
Convert a timeval to a database specific time string.
This function will convert a timeval into a time string that can be used in database queries.
The text argument must point to a string that can hold at least 32 characters.
Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).
| dsdb | - pointer to the database connection |
| tval | - pointer to the timeval (in seconds since 1970) |
| text | - output: time string |