Databases Reference
In-Depth Information
For convenience we will introduce a system variable with the path to the images. So
that we, or end users of our plugin, can then simply store filenames in the table, and
the path will be added automatically:
static char *exif_path;
static MYSQL_SYSVAR_STR(path, exif_path,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC,
"The path to image files", NULL, NULL, "");
And let's write a plugin declaration now, while we're at it:
static struct st_mysql_ftparser ft_exif =
{
MYSQL_FTPARSER_INTERFACE_VERSION,
exif_parse,
NULL,
NULL
};
static struct st_mysql_sys_var* exif_system_var[] =
{
MYSQL_SYSVAR(path),
NULL
};
mysql_declare_plugin(ftexif)
{
MYSQL_FTPARSER_PLUGIN,
&ft_exif,
"exif",
"Andrew Hutchings <Andrew.Hutchings@Sun.COM>",
"A graphic file EXIF Full-Text Parser",
PLUGIN_LICENSE_GPL,
NULL,
NULL,
0x0100,
NULL,
exif_system_var,
NULL
}
mysql_declare_plugin_end;
 
Search WWH ::




Custom Search