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