33 #include <drizzled/function/str/strfunc.h>
35 #include "memcached_functions.h"
38 #include <libmemcached/memcached.h>
54 if ((arg_count != 3 && arg_count != 4) ||
55 ! (key= args[0]->val_str(&value)) ||
56 ! (res= args[1]->val_str(&value)) ||
57 ! (cas= args[2]->val_str(&value)) ||
65 String *tmp_exp= args[3]->val_str(&value);;
67 expiration= (time_t)atoi(tmp_exp->c_ptr());
70 rc= memcached_cas(memc, key->c_ptr(), key->length(),
71 res->c_ptr(), res->length(),
72 expiration, (uint16_t) 0,
73 (uint64_t) strtol(cas->c_ptr(), (
char **)NULL, 10));
75 if (rc != MEMCACHED_SUCCESS)
TODO: Rename this file - func.h is stupid.