Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5b7a841
fix regression
juliannguyen4 Aug 6, 2025
7d67f12
add regression test.
juliannguyen4 Aug 6, 2025
af81d29
add neg test
juliannguyen4 Aug 6, 2025
2a0da1b
rm
juliannguyen4 Aug 6, 2025
033397b
Merge remote-tracking branch 'origin/dev' into CLIENT-3651-fix-passin…
juliannguyen4 Aug 19, 2025
2e3a82a
Merge remote-tracking branch 'origin/dev' into CLIENT-3651-fix-passin…
juliannguyen4 Dec 18, 2025
380e6a1
Merge remote-tracking branch 'origin/dev' into CLIENT-3651-fix-passin…
juliannguyen4 Jan 2, 2026
5782f65
Improve naming for as_cdt_ctx helper function
juliannguyen4 Jan 2, 2026
74b997c
function docstring belongs in header file
juliannguyen4 Jan 2, 2026
22bd028
Fix bug for all operations and expressions that accept a ctx argument
juliannguyen4 Jan 2, 2026
2bec4fd
Cherrypick some test changes from Dominic's CLIENT-2383 branch
juliannguyen4 Jan 2, 2026
78e4eff
Explicitly state
juliannguyen4 Jan 2, 2026
a337395
Refactor ctx conversion code for expressions
juliannguyen4 Jan 3, 2026
e1d1a04
fix compiler error
juliannguyen4 Jan 3, 2026
1ee6751
fix
juliannguyen4 Jan 3, 2026
14015f5
Merge remote-tracking branch 'origin/dev' into CLIENT-3651-fix-passin…
juliannguyen4 Jan 8, 2026
232dbc4
Short term fix.
juliannguyen4 Jan 8, 2026
7a1af23
Fix...
juliannguyen4 Jan 8, 2026
05c57e3
Rename to something more generic because expressions have a dictionar…
juliannguyen4 Jan 8, 2026
5212466
convert_expressions.c already mallocs the ctx obj for us
juliannguyen4 Jan 8, 2026
9a0ef70
Fix tests
juliannguyen4 Jan 8, 2026
b856220
Fix tests. Not sure why invalid ctx test does not expect a ParamError
juliannguyen4 Jan 8, 2026
575485c
Just allow NULL to be safe. this was the old behavior
juliannguyen4 Jan 8, 2026
fa6de73
Remove duplicate test case
juliannguyen4 Jan 8, 2026
80996c4
Add negative input test for index_cdt_create
juliannguyen4 Jan 8, 2026
d9a891c
Fix test....
juliannguyen4 Jan 8, 2026
5874e8d
this is much cleaner
juliannguyen4 Jan 9, 2026
302e182
Clear up
juliannguyen4 Jan 9, 2026
ff5e48a
Rename to something more helpful
juliannguyen4 Jan 9, 2026
d99892a
this makes more sense. remove unused var
juliannguyen4 Jan 9, 2026
9c80ab7
Improve naming
juliannguyen4 Jan 9, 2026
12343cf
Rename var to something more helpful
juliannguyen4 Jan 9, 2026
6632640
Create helper function to heap allocate as_cdt_ctx since there is an …
juliannguyen4 Jan 9, 2026
ad04827
In case ctx is None or not set, just return AEROSPIKE_OK assuming the…
juliannguyen4 Jan 9, 2026
ed7d400
fix
juliannguyen4 Jan 9, 2026
edd0ed3
I think this is correct
juliannguyen4 Jan 9, 2026
97fa3c6
fix
juliannguyen4 Jan 9, 2026
55d5a77
Fix
juliannguyen4 Jan 9, 2026
bcfc356
this should work
juliannguyen4 Jan 9, 2026
4e27ba8
fix
juliannguyen4 Jan 9, 2026
8d1e419
fix
juliannguyen4 Jan 9, 2026
09f4126
fix
juliannguyen4 Jan 9, 2026
ae9cfdd
finish...
juliannguyen4 Jan 9, 2026
fc8c760
as_cdt_ctx_create_from_pyobject is only used by Query.where() which t…
juliannguyen4 Jan 9, 2026
d2d7065
Clear up
juliannguyen4 Jan 9, 2026
8b3c63e
Clear up
juliannguyen4 Jan 9, 2026
bc367da
Rename since we have the optional param
juliannguyen4 Jan 9, 2026
0dccd79
fix
juliannguyen4 Jan 9, 2026
26ee075
Fix segfault
juliannguyen4 Jan 9, 2026
9f42edb
fix
juliannguyen4 Jan 9, 2026
470421e
refactor
juliannguyen4 Jan 9, 2026
50c1add
fix
juliannguyen4 Jan 12, 2026
12a1e89
Merge remote-tracking branch 'origin/dev' into CLIENT-3651-fix-passin…
juliannguyen4 Jan 27, 2026
e597221
fix
juliannguyen4 Jan 28, 2026
bbbdb2a
Clean up docstrings
juliannguyen4 Jan 28, 2026
6d1d5dc
Polish
juliannguyen4 Jan 28, 2026
a1a4389
fix
juliannguyen4 Jan 28, 2026
0019f21
clear up
juliannguyen4 Jan 28, 2026
4b75067
DRY
juliannguyen4 Jan 28, 2026
1628950
Reduce repetition in comments
juliannguyen4 Jan 28, 2026
c6858ac
Fix memory error where as_cdt_ctx_destroy is called on an uninitializ…
juliannguyen4 Jan 28, 2026
85041f3
Merge remote-tracking branch 'origin/dev' into CLIENT-3651-fix-passin…
juliannguyen4 Jan 29, 2026
c9f60f8
Fix
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
33 changes: 30 additions & 3 deletions src/include/conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,36 @@ as_status string_and_pyuni_from_pystring(PyObject *py_string,
PyObject **pyuni_r, char **c_str_ptr,
as_error *err);

as_status get_cdt_ctx(AerospikeClient *self, as_error *err, as_cdt_ctx *cdt_ctx,
PyObject *op_dict, bool *ctx_in_use,
as_static_pool *static_pool, int serializer_type);
// This takes in a Python "list of contexts" argument from an API,
// and returns the as_cdt_ctx* value to be passed to the C client API
//
// This assumes that the C client API's ctx parameter is optional and can accept a NULL value
// If this call succeeds and returns a non-NULL as_cdt_ctx reference, the user is responsible for destroying it.
// Sets err on error.
// The API calls that take in a Python list of contexts doesn't check the parameter's type, so we check it here.
as_cdt_ctx *as_cdt_ctx_create_from_pyobject(AerospikeClient *self,
as_error *err,
PyObject *py_ctx_list,
as_static_pool *static_pool,
int serializer_type);

// See docstring for as_cdt_ctx_create_from_pyobject
//
// The cdt_ctx argument *must* point to an uninitialized as_cdt_ctx object in order to initialize it.
// This method is only used for stack allocated as_cdt_ctx objects where the C client API only needs to use it once.
as_cdt_ctx *as_cdt_ctx_init_from_pyobject(AerospikeClient *self, as_error *err,
as_cdt_ctx *cdt_ctx,
PyObject *py_ctx_list,
as_static_pool *static_pool,
int serializer_type);

// This takes in a Python operations dictionary created from aerospike_helpers.operations,
// and returns the as_cdt_ctx* value to be passed to the C client API that adds operations
//
// See docstring for as_cdt_ctx_init_from_pyobject
as_cdt_ctx *get_optional_cdt_ctx_from_py_dict_and_as_cdt_ctx_init(
AerospikeClient *self, as_error *err, as_cdt_ctx *cdt_ctx,
PyObject *py_op_dict, as_static_pool *static_pool, int serializer_type);

// allow_base64_encoded_exprs: can the Python object also be a Python unicode object (base64 encoded)?
// if false, the Python object should only be a compiled Python expression object from aerospike_helpers
Expand Down
Loading