21 #include <drizzled/function/math/int.h>
22 #include <drizzled/plugin/function.h>
34 const char *func_name()
const
39 void fix_length_and_dec()
52 assert(fixed ==
true);
53 String *res=args[0]->val_str(&value);
62 return (int64_t) res->length();
65 plugin::Create_function<LengthFunction> *lengthudf= NULL;
66 plugin::Create_function<LengthFunction> *octet_lengthudf= NULL;
70 lengthudf=
new plugin::Create_function<LengthFunction>(
"length");
71 octet_lengthudf=
new plugin::Create_function<LengthFunction>(
"octet_length");
72 context.add(lengthudf);
73 context.add(octet_lengthudf);
77 DRIZZLE_DECLARE_PLUGIN
82 "Devananda van der Veen",
83 N_(
"LENGTH and OCTET_LENGTH functions"),
89 DRIZZLE_DECLARE_PLUGIN_END;
TODO: Rename this file - func.h is stupid.
bool check_argument_count(int n)