if (args->arg_count == 0) {
grn_snprintf(message,
MYSQL_ERRMSG_SIZE,
MYSQL_ERRMSG_SIZE, "mroonga_command(): Wrong number of arguments: %u for 1..",
args->arg_count); goto error;
}
if ((args->arg_count % 2) == 0) {
grn_snprintf(message,
MYSQL_ERRMSG_SIZE,
MYSQL_ERRMSG_SIZE, "mroonga_command(): The number of arguments must be odd: %u",
args->arg_count); goto error;
}
for (unsignedint i = 0; i < args->arg_count; ++i) { switch (args->arg_type[i]) { case STRING_RESULT: // OK break; case REAL_RESULT:
grn_snprintf(message,
MYSQL_ERRMSG_SIZE,
MYSQL_ERRMSG_SIZE, "mroonga_command(): Argument must be string: <%g>",
*reinterpret_cast<double *>(args->args[i])); goto error; break; case INT_RESULT:
grn_snprintf(message,
MYSQL_ERRMSG_SIZE,
MYSQL_ERRMSG_SIZE, "mroonga_command(): Argument must be string: <%lld>",
*reinterpret_cast<longlong *>(args->args[i])); goto error; break; case DECIMAL_RESULT:
grn_snprintf(message,
MYSQL_ERRMSG_SIZE,
MYSQL_ERRMSG_SIZE, "mroonga_command(): Argument must be string: <%.*s>", static_cast<int>(args->lengths[i]),
args->args[i]); goto error; break; default:
grn_snprintf(message,
MYSQL_ERRMSG_SIZE,
MYSQL_ERRMSG_SIZE, "mroonga_command(): Argument must be string: <%d>(%u)",
args->arg_type[i],
i); goto error; break;
}
}
init->maybe_null = 1;
init->const_item = 0;
init->max_length = 640;
info = (CommandInfo *)mrn_my_malloc(sizeof(CommandInfo),
MYF(MY_WME | MY_ZEROFILL)); if (!info) {
strcpy(message, "mroonga_command(): out of memory"); goto error;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.