SpatiaLite
3.0.0-stable
|
Auxiliary/helper functions. More...
Go to the source code of this file.
Defines | |
#define | GAIA_SQL_SINGLE_QUOTE 1001 |
SQL single quoted string (text constant) | |
#define | GAIA_SQL_DOUBLE_QUOTE 1002 |
SQL double quoted string (SQL name) | |
Functions | |
GAIAAUX_DECLARE const char * | gaiaGetLocaleCharset (void) |
Retrieves the Locale Charset. | |
GAIAAUX_DECLARE int | gaiaConvertCharset (char **buf, const char *fromCs, const char *toCs) |
Converts a text string from one charset to another. | |
GAIAAUX_DECLARE void * | gaiaCreateUTF8Converter (const char *fromCS) |
Creates a persistent UTF8 converter object. | |
GAIAAUX_DECLARE void | gaiaFreeUTF8Converter (void *cvtCS) |
Destroys an UTF8 converter object. | |
GAIAAUX_DECLARE char * | gaiaConvertToUTF8 (void *cvtCS, const char *buf, int len, int *err) |
Converts a text string to UTF8. | |
GAIAAUX_DECLARE int | gaiaIsReservedSqliteName (const char *name) |
Checks if a name is a reserved SQLite name. | |
GAIAAUX_DECLARE int | gaiaIsReservedSqlName (const char *name) |
Checks if a name is a reserved SQL name. | |
GAIAAUX_DECLARE int | gaiaIllegalSqlName (const char *name) |
Checks if a name is an illegal SQL name. | |
GAIAAUX_DECLARE char * | gaiaSingleQuotedSql (const char *value) |
Properly formats an SQL text constant. | |
GAIAAUX_DECLARE char * | gaiaDoubleQuotedSql (const char *value) |
Properly formats an SQL name. | |
GAIAAUX_DECLARE char * | gaiaQuotedSql (const char *value, int quote) |
Properly formats an SQL generic string. | |
GAIAAUX_DECLARE void | gaiaCleanSqlString (char *value) |
deprecated function |
Auxiliary/helper functions.
GAIAAUX_DECLARE void gaiaCleanSqlString | ( | char * | value | ) |
deprecated function
value | the string to be formatted |
GAIAAUX_DECLARE int gaiaConvertCharset | ( | char ** | buf, |
const char * | fromCs, | ||
const char * | toCs | ||
) |
Converts a text string from one charset to another.
buf | the text string to be converted |
fromCs | the GNU ICONV name identifying the input charset |
toCs | the GNU ICONV name identifying the output charset |
GAIAAUX_DECLARE char* gaiaConvertToUTF8 | ( | void * | cvtCS, |
const char * | buf, | ||
int | len, | ||
int * | err | ||
) |
Converts a text string to UTF8.
cvtCS | the handle identifying the UTF8 convert object (returned by a previous call to gaiaCreateUTF8Converter). |
buf | the input text string |
len | length (in bytes) of input string |
err | on completion will contain 0 on success, any other value on failure |
GAIAAUX_DECLARE void* gaiaCreateUTF8Converter | ( | const char * | fromCS | ) |
Creates a persistent UTF8 converter object.
fromCS | the GNU ICONV name identifying the input charset |
GAIAAUX_DECLARE char* gaiaDoubleQuotedSql | ( | const char * | value | ) |
Properly formats an SQL name.
value | the SQL name to be formatted |
GAIAAUX_DECLARE void gaiaFreeUTF8Converter | ( | void * | cvtCS | ) |
Destroys an UTF8 converter object.
cvtCS | the handle identifying the UTF8 convert object (returned by a previous call to gaiaCreateUTF8Converter). |
GAIAAUX_DECLARE const char* gaiaGetLocaleCharset | ( | void | ) |
Retrieves the Locale Charset.
GAIAAUX_DECLARE int gaiaIllegalSqlName | ( | const char * | name | ) |
Checks if a name is an illegal SQL name.
name | the name to be checked |
GAIAAUX_DECLARE int gaiaIsReservedSqliteName | ( | const char * | name | ) |
Checks if a name is a reserved SQLite name.
name | the name to be checked |
GAIAAUX_DECLARE int gaiaIsReservedSqlName | ( | const char * | name | ) |
Checks if a name is a reserved SQL name.
name | the name to be checked |
GAIAAUX_DECLARE char* gaiaQuotedSql | ( | const char * | value, |
int | quote | ||
) |
Properly formats an SQL generic string.
value | the string to be formatted |
quote | GAIA_SQL_SINGLE_QUOTE or GAIA_SQL_DOUBLE_QUOTE |
GAIAAUX_DECLARE char* gaiaSingleQuotedSql | ( | const char * | value | ) |
Properly formats an SQL text constant.
value | the text string to be formatted |