Skip to content

Commit

Permalink
INTERNAL: Rename update_filter to eflag_update
Browse files Browse the repository at this point in the history
  • Loading branch information
ing-eoking authored and jhpark816 committed Dec 18, 2024
1 parent 769f014 commit 1b2017b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
30 changes: 23 additions & 7 deletions libmemcached/collection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4989,11 +4989,11 @@ memcached_return_t memcached_coll_eflag_filter_set_bitwise(memcached_coll_eflag_
return MEMCACHED_SUCCESS;
}

/* memcached_coll_update_filter_st */
/* memcached_coll_eflag_update_st */

memcached_return_t memcached_coll_update_filter_init(memcached_coll_update_filter_st *ptr,
const unsigned char *fvalue,
const size_t fvalue_length)
memcached_return_t memcached_coll_eflag_update_init(memcached_coll_eflag_update_st *ptr,
const unsigned char *fvalue,
const size_t fvalue_length)
{
if (not ptr)
{
Expand All @@ -5015,9 +5015,9 @@ memcached_return_t memcached_coll_update_filter_init(memcached_coll_update_filte
return MEMCACHED_SUCCESS;
}

memcached_return_t memcached_coll_update_filter_set_bitwise(memcached_coll_update_filter_st *ptr,
const size_t fwhere,
memcached_coll_bitwise_t bitwise_op)
memcached_return_t memcached_coll_eflag_update_set_bitwise(memcached_coll_eflag_update_st *ptr,
const size_t fwhere,
memcached_coll_bitwise_t bitwise_op)
{
if (not ptr)
{
Expand All @@ -5037,6 +5037,22 @@ memcached_return_t memcached_coll_update_filter_set_bitwise(memcached_coll_updat
return MEMCACHED_SUCCESS;
}

// DEPRECATED
memcached_return_t memcached_coll_update_filter_init(memcached_coll_update_filter_st *ptr,
const unsigned char *fvalue,
const size_t fvalue_length)
{
return memcached_coll_eflag_update_init(ptr, fvalue, fvalue_length);
}

// DEPRECATED
memcached_return_t memcached_coll_update_filter_set_bitwise(memcached_coll_update_filter_st *ptr,
const size_t fwhere,
memcached_coll_bitwise_t bitwise_op)
{
return memcached_coll_eflag_update_set_bitwise(ptr, fwhere, bitwise_op);
}

size_t memcached_hexadecimal_to_str(memcached_hexadecimal_st *ptr,
char *buffer, size_t buffer_length)
{
Expand Down
20 changes: 16 additions & 4 deletions libmemcached/collection.h
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ memcached_return_t memcached_coll_eflag_filter_set_bitwise(memcached_coll_eflag_
* B+tree eflag filter used for certain update commands.
* This is just for convenience.
*/
struct memcached_coll_update_filter_st {
struct memcached_coll_eflag_update_st {
size_t fwhere;
size_t flength;

Expand Down Expand Up @@ -749,9 +749,9 @@ struct memcached_coll_update_filter_st {
* @param fvalue_length value length (number of bytes).
*/
LIBMEMCACHED_API
memcached_return_t memcached_coll_update_filter_init(memcached_coll_update_filter_st *ptr,
const unsigned char *fvalue,
const size_t fvalue_length);
memcached_return_t memcached_coll_eflag_update_init(memcached_coll_eflag_update_st *ptr,
const unsigned char *fvalue,
const size_t fvalue_length);

/**
* Initialize the b+tree eflag filter used for update commands.
Expand All @@ -761,6 +761,18 @@ memcached_return_t memcached_coll_update_filter_init(memcached_coll_update_filte
* @param bitwise_op bitwise operator.
*/
LIBMEMCACHED_API
memcached_return_t memcached_coll_eflag_update_set_bitwise(memcached_coll_eflag_update_st *ptr,
const size_t fwhere,
memcached_coll_bitwise_t bitwise_op);

// DEPRECATED
LIBMEMCACHED_API
memcached_return_t memcached_coll_update_filter_init(memcached_coll_update_filter_st *ptr,
const unsigned char *fvalue,
const size_t fvalue_length);

// DEPRECATED
LIBMEMCACHED_API
memcached_return_t memcached_coll_update_filter_set_bitwise(memcached_coll_update_filter_st *ptr,
const size_t fwhere,
memcached_coll_bitwise_t bitwise_op);
Expand Down
3 changes: 2 additions & 1 deletion libmemcached/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ typedef struct memcached_coll_query_st memcached_bop_query_st;
typedef struct memcached_hexadecimal_st memcached_hexadecimal_st;
typedef struct memcached_mkey_st memcached_mkey_st;
typedef struct memcached_coll_eflag_filter_st memcached_coll_eflag_filter_st;
typedef struct memcached_coll_update_filter_st memcached_coll_update_filter_st;
typedef struct memcached_coll_eflag_update_st memcached_coll_eflag_update_st;
typedef struct memcached_coll_eflag_update_st memcached_coll_update_filter_st;
typedef struct memcached_coll_smget_result_st memcached_coll_smget_result_st;

#ifdef __cplusplus
Expand Down

0 comments on commit 1b2017b

Please sign in to comment.