Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0fa3ed2
First pass at refactoring. Many memory leaks present
juliannguyen4 Jan 9, 2026
b9d6ecd
fix
juliannguyen4 Jan 9, 2026
5dab352
fix
juliannguyen4 Jan 9, 2026
8b524a3
fix
juliannguyen4 Jan 10, 2026
e666b80
list_sort doesn't take in a list_order arg
juliannguyen4 Jan 10, 2026
2e2b84f
fix index param related errors
juliannguyen4 Jan 10, 2026
d6d5d01
Add missing breaks
juliannguyen4 Jan 10, 2026
3250d01
Fix some operations not receiving the return type in python
juliannguyen4 Jan 10, 2026
c2c56f4
fix.
juliannguyen4 Jan 12, 2026
8b9fc85
fix
juliannguyen4 Jan 12, 2026
fd97333
Fix
juliannguyen4 Jan 12, 2026
2155493
Move switch cases in ascending order so there is a greater chance the…
juliannguyen4 Jan 12, 2026
3e6ebb1
fix...
juliannguyen4 Jan 12, 2026
43e959f
fix
juliannguyen4 Jan 12, 2026
80797cb
fix
juliannguyen4 Jan 12, 2026
d075896
Revert "fix"
juliannguyen4 Jan 12, 2026
ca3a433
fix
juliannguyen4 Jan 12, 2026
935373b
Fix
juliannguyen4 Jan 12, 2026
799f8eb
fix
juliannguyen4 Jan 12, 2026
efe8f4a
fix
juliannguyen4 Jan 12, 2026
c61d4a4
Create a variable to get the results of the ternary operation. This m…
juliannguyen4 Jan 12, 2026
114c568
list_append and list_insert take in a different key for the list of v…
juliannguyen4 Jan 12, 2026
77531b5
fix
juliannguyen4 Jan 12, 2026
7135611
Also refactor list_policy code to reduce number of times ternary oper…
juliannguyen4 Jan 12, 2026
23b4821
fix...
juliannguyen4 Jan 12, 2026
0cf272f
fix
juliannguyen4 Jan 12, 2026
86a21f5
Fix mem leaks
juliannguyen4 Jan 12, 2026
982816e
Fix
juliannguyen4 Jan 12, 2026
ed26bbd
as_val shouldn't be destroyed since C client already takes ownership …
juliannguyen4 Jan 12, 2026
a1ed9b7
fix
juliannguyen4 Jan 12, 2026
f372b80
Curly brackets only needed after case if local variable is initialized
juliannguyen4 Jan 12, 2026
a339e89
use X-macro to map operation codes to operation names
juliannguyen4 Jan 12, 2026
23f5b55
Define global variable in C source file instead of header to avoid du…
juliannguyen4 Jan 12, 2026
6f34f7c
Fix memory error
juliannguyen4 Jan 13, 2026
940a704
move heap allocations further down the function for performance
juliannguyen4 Jan 13, 2026
4207bf3
Fix bug where get_cdt_ctx calls a C client API even though the conver…
juliannguyen4 Jan 13, 2026
18e9a3e
get_cdt_ctx must set status local var or it will be AEROSPIKE_OK
juliannguyen4 Jan 13, 2026
4f41534
Clear up why we have this flag instead of using succeed flag
juliannguyen4 Jan 13, 2026
5e73947
Add test case for list_remove_by_index_range receiving count = None
juliannguyen4 Jan 13, 2026
22094f1
Revert "Add test case for list_remove_by_index_range receiving count …
juliannguyen4 Jan 13, 2026
f257041
Those stack vars belong to specific cases so they should be in their …
juliannguyen4 Jan 13, 2026
8478474
Merge remote-tracking branch 'origin/dev' into CLIENT-4055-refactor-c…
juliannguyen4 Jan 16, 2026
21c27ed
Merge remote-tracking branch 'origin/dev' into CLIENT-4055-refactor-c…
juliannguyen4 Jan 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 25 additions & 43 deletions src/include/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,50 +41,32 @@ enum Aerospike_send_bool_as_values {
SEND_BOOL_AS_AS_BOOL, /* default for writing Python bools */
};

#define LIST_OP_NAMES_EXCEPT_LIST_APPEND \
X(LIST_APPEND_ITEMS), X(LIST_INSERT), X(LIST_INSERT_ITEMS), X(LIST_POP), \
X(LIST_POP_RANGE), X(LIST_REMOVE), X(LIST_REMOVE_RANGE), \
X(LIST_CLEAR), X(LIST_SET), X(LIST_GET), X(LIST_GET_RANGE), \
X(LIST_TRIM), X(LIST_SIZE), X(LIST_INCREMENT), X(LIST_GET_BY_INDEX), \
X(LIST_GET_BY_INDEX_RANGE), X(LIST_GET_BY_RANK), \
X(LIST_GET_BY_RANK_RANGE), X(LIST_GET_BY_VALUE), \
X(LIST_GET_BY_VALUE_LIST), X(LIST_GET_BY_VALUE_RANGE), \
X(LIST_REMOVE_BY_INDEX), X(LIST_REMOVE_BY_INDEX_RANGE), \
X(LIST_REMOVE_BY_RANK), X(LIST_REMOVE_BY_RANK_RANGE), \
X(LIST_REMOVE_BY_VALUE), X(LIST_REMOVE_BY_VALUE_LIST), \
X(LIST_REMOVE_BY_VALUE_RANGE), X(LIST_SET_ORDER), X(LIST_SORT), \
X(LIST_REMOVE_BY_VALUE_RANK_RANGE_REL), \
X(LIST_GET_BY_VALUE_RANK_RANGE_REL), \
X(LIST_GET_BY_VALUE_RANK_RANGE_REL_TO_END), \
X(LIST_GET_BY_INDEX_RANGE_TO_END), X(LIST_GET_BY_RANK_RANGE_TO_END), \
X(LIST_REMOVE_BY_REL_RANK_RANGE_TO_END), \
X(LIST_REMOVE_BY_REL_RANK_RANGE), \
X(LIST_REMOVE_BY_INDEX_RANGE_TO_END), \
X(LIST_REMOVE_BY_RANK_RANGE_TO_END), X(LIST_CREATE)

enum Aerospike_list_operations {
OP_LIST_APPEND = 1001,
OP_LIST_APPEND_ITEMS,
OP_LIST_INSERT,
OP_LIST_INSERT_ITEMS,
OP_LIST_POP,
OP_LIST_POP_RANGE,
OP_LIST_REMOVE,
OP_LIST_REMOVE_RANGE,
OP_LIST_CLEAR,
OP_LIST_SET,
OP_LIST_GET,
OP_LIST_GET_RANGE,
OP_LIST_TRIM,
OP_LIST_SIZE,
OP_LIST_INCREMENT,
OP_LIST_GET_BY_INDEX,
OP_LIST_GET_BY_INDEX_RANGE,
OP_LIST_GET_BY_RANK,
OP_LIST_GET_BY_RANK_RANGE,
OP_LIST_GET_BY_VALUE,
OP_LIST_GET_BY_VALUE_LIST,
OP_LIST_GET_BY_VALUE_RANGE,
OP_LIST_REMOVE_BY_INDEX,
OP_LIST_REMOVE_BY_INDEX_RANGE,
OP_LIST_REMOVE_BY_RANK,
OP_LIST_REMOVE_BY_RANK_RANGE,
OP_LIST_REMOVE_BY_VALUE,
OP_LIST_REMOVE_BY_VALUE_LIST,
OP_LIST_REMOVE_BY_VALUE_RANGE,
OP_LIST_SET_ORDER,
OP_LIST_SORT,
OP_LIST_REMOVE_BY_VALUE_RANK_RANGE_REL,
OP_LIST_GET_BY_VALUE_RANK_RANGE_REL,

// for use in expressions
OP_LIST_GET_BY_VALUE_RANK_RANGE_REL_TO_END,
OP_LIST_GET_BY_INDEX_RANGE_TO_END,
OP_LIST_GET_BY_RANK_RANGE_TO_END,
OP_LIST_REMOVE_BY_REL_RANK_RANGE_TO_END,
OP_LIST_REMOVE_BY_REL_RANK_RANGE,
OP_LIST_REMOVE_BY_INDEX_RANGE_TO_END,
OP_LIST_REMOVE_BY_RANK_RANGE_TO_END,
OP_LIST_CREATE
#define X(op_name) OP_##op_name
X(LIST_APPEND) = 1001,
LIST_OP_NAMES_EXCEPT_LIST_APPEND
#undef X
};

enum Aerospike_map_operations {
Expand Down
Loading