![]() |
![]() |
![]() |
WritRecogn Reference Manual | ![]() |
---|---|---|---|---|
enum TableIndex; FieldProperties; TableProperties; #define MAIN_KEY_FIELD typedef TableFlags; #define INTEGER_DATA_TYPE #define TEXT_DATA_TYPE #define MAIN_KEY_FIELD_PROPERITIES #define RELATIVEBOUNDINGBOX_TABLE_FIELDS enum RELATIVEBOUNDINGBOX_TABLE_FIELD_ID; #define RELATIVERADICALSEQUENCE_TABLE_FIELDS enum RELATIVERADICALSEQUENCE_TABLE_FIELD_ID; #define LANG_TABLE_FIELDS enum LANG_TABLE_FIELD_ID; #define VARIANT_TABLE_FIELDS enum VARIANT_TABLE_FIELD_ID; #define INPUTCODE_TABLE_FIELDS enum INPUTCODE_TABLE_FIELD_ID; #define STROKEDATA_TABLE_FIELDS enum STROKE_DATA_TABLE_FIELD_ID; #define WRITRECOGN_TABLE_FIELDS enum WRITRECOGN_TABLE_FIELD_ID; WritRecognDB_properties; extern WritRecognDB_properties writRecognDB_properties; void characterDataFile_sqlite_set_referee (CharacterDataFile *charDataFile); RadicalList* sqliteTable_append_result_radicalList (sqlite3 *db, TableProperties *table, const gchar *sqlClause, RadicalList *radList); RadicalArray* sqliteTable_append_result_radicalArray (SQLite *db, TableProperties *table, const gchar *sqlClause, RadicalArray *radArray); RadicalList* sqliteCharacterDataFile_query_allTables_radicalList (SQLite *db, const gchar *queryTemplate); RadicalArray* sqliteCharacterDataFile_query_allTables_radicalArray (SQLite *db, const gchar *queryTemplate); int writRecognDB_properties_parse_result_callback (void *db_properties, int colNum, char **recStr, char **azColName); gchar* writRecognDB_properties_to_insertCmds (gpointer obj); gchar* writRecognDB_properties_to_updateCmds (gpointer obj);
typedef enum { RELATIVEBOUNDINGBOX_TABLE_INDEX = 0, RELATIVERADICALSEQUENCE_TABLE_INDEX, LANG_TABLE_INDEX, VARIANT_TABLE_INDEX, INPUTCODE_TABLE_INDEX, STROKEDATA_TABLE_INDEX, WRITRECOGN_TABLE_INDEX, TABLE_COUNTS } TableIndex;
typedef struct { const gchar *name; const FieldProperties *fields; int (*parse_result_callback) (void *radicalList, int colNum, char **recStr, char **azColName); gchar *(*to_insertCmd) (gpointer obj); gchar *(*to_updateCmd) (gpointer obj); } TableProperties;
typedef enum { RELATIVEBOUNDINGBOX_TABLE_FIELD_ID_RADICALCODE = 0, RELATIVEBOUNDINGBOX_TABLE_FIELD_ID_BOXSEQUENCEID, RELATIVEBOUNDINGBOX_TABLE_FIELD_ID_SUBRADICALID, RELATIVEBOUNDINGBOX_TABLE_FIELD_ID_SUBRADICALCODE, RELATIVEBOUNDINGBOX_TABLE_FIELD_ID_LEFT, RELATIVEBOUNDINGBOX_TABLE_FIELD_ID_TOP, RELATIVEBOUNDINGBOX_TABLE_FIELD_ID_RIGHT, RELATIVEBOUNDINGBOX_TABLE_FIELD_ID_BOTTOM } RELATIVEBOUNDINGBOX_TABLE_FIELD_ID;
typedef enum { RELATIVERADICALSEQUENCE_TABLE_FIELD_ID_RADICALCODE = 0, RELATIVERADICALSEQUENCE_TABLE_FIELD_ID_SEQHORZ, RELATIVERADICALSEQUENCE_TABLE_FIELD_ID_SEQVERT, } RELATIVERADICALSEQUENCE_TABLE_FIELD_ID;
typedef enum { LANG_TABLE_FIELD_ID_RADICALCODE = 0, LANG_TABLE_FIELD_ID_LANG } LANG_TABLE_FIELD_ID;
typedef enum { VARIANT_TABLE_FIELD_ID_RADICALCODE = 0, VARIANT_TABLE_FIELD_ID_VARRADICALCODE } VARIANT_TABLE_FIELD_ID;
typedef enum { INPUTCODE_TABLE_FIELD_ID_RADICALCODE = 0, INPUTCODE_TABLE_FIELD_ID_METHOD, INPUTCODE_TABLE_FIELD_ID_INPUTCODE, } INPUTCODE_TABLE_FIELD_ID;
typedef enum { STROKE_DATA_TABLE_FIELD_ID_RADICALCODE = 0, STROKE_DATA_TABLE_FIELD_ID_WRITINGID, STROKE_DATA_TABLE_FIELD_ID_STROKEID, STROKE_DATA_TABLE_FIELD_ID_NODEID, STROKE_DATA_TABLE_FIELD_ID_NODEX, STROKE_DATA_TABLE_FIELD_ID_NODEY } STROKE_DATA_TABLE_FIELD_ID;
typedef enum { WRITRECOGN_TABLE_FIELD_ID_VERSION = 0, } WRITRECOGN_TABLE_FIELD_ID;
void characterDataFile_sqlite_set_referee (CharacterDataFile *charDataFile);
Set the character data file which following database operations refer to.
Some database manipulate functions will use the fields in character data file. This function set the character data file that following database operations require.
|
the character data file which following database operations refer to. |
RadicalList* sqliteTable_append_result_radicalList (sqlite3 *db, TableProperties *table, const gchar *sqlClause, RadicalList *radList);
This function is faster than sqliteTable_append_result_radicalArray()
,
so unless the full character details are required immediately,
this function is preferred.
returns
: Return radList, NULL when the function failed.
|
The character database. |
|
the table to process. |
|
the SQL clause. |
|
the non-NULL radList which store the result. |
Returns : |
RadicalArray* sqliteTable_append_result_radicalArray (SQLite *db, TableProperties *table, const gchar *sqlClause, RadicalArray *radArray);
This function is slower than sqliteTable_append_result_radicalList()
,
so unless the full character details are required immediately,
use sqliteTable_append_result_radicalList()
.
returns
: Return radArray, NULL when the function failed.
|
The character database. |
|
the table to process. |
|
the SQL clause. |
|
the non-NULL radArray which store the result. |
Returns : |
RadicalList* sqliteCharacterDataFile_query_allTables_radicalList (SQLite *db, const gchar *queryTemplate);
The query is submitted in the form of template.
The s
in template will be replaced by the name of the tables.
For example: "SELECT * FROM s
WHERE RadicalCode=1000;"
This function is faster than sqliteCharacterDataFile_query_allTables_radicalArray()
,
so unless the full character details are required immediately,
this function is preferred.
returns
: Return a radical list, NULL when the function failed.
|
The character database. |
|
Template of query, see the function description. |
Returns : |
RadicalArray* sqliteCharacterDataFile_query_allTables_radicalArray (SQLite *db, const gchar *queryTemplate);
The query is submitted in the form of template.
The s
in template will be replaced by the name of the tables.
For example: "SELECT * FROM s
WHERE RadicalCode=1000;"
This function is slower than sqliteCharacterDataFile_query_allTables_radicalList()
,
so unless the full character details are required immediately,
use sqliteCharacterDataFile_query_allTables_radicalList()
.
returns
: Return a radical array, NULL when the function failed.
|
The character database. |
|
Template of query, see the function description. |
Returns : |
int writRecognDB_properties_parse_result_callback (void *db_properties, int colNum, char **recStr, char **azColName);
|
|
|
|
|
|
|
|
Returns : |
gchar* writRecognDB_properties_to_insertCmds (gpointer obj);
|
|
Returns : |