Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into CLIENT-3106-map-err-co…
Browse files Browse the repository at this point in the history
…de-to-exc
  • Loading branch information
juliannguyen4 committed Sep 25, 2024
2 parents cbe2967 + 796109c commit fb52e27
Show file tree
Hide file tree
Showing 13 changed files with 555 additions and 628 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.0.1rc5.dev7
15.2.0rc1.dev1
20 changes: 0 additions & 20 deletions src/include/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,13 @@
#include <Python.h>
#include <aerospike/as_status.h>

/*
* Enum to declare log level constants
*/
typedef enum Aerospike_log_level_e {

LOG_LEVEL_OFF = -1,
LOG_LEVEL_ERROR,
LOG_LEVEL_WARN,
LOG_LEVEL_INFO,
LOG_LEVEL_DEBUG,
LOG_LEVEL_TRACE

} aerospike_log_level;

/*
* Structure to hold user's log_callback object
*/
typedef struct Aerospike_log_callback {
PyObject *callback;
} AerospikeLogCallback;

/**
* Add log level constants to aerospike module
* aerospike.set_log_level(aerospike.LOG_LEVEL_DEBUG)
*/
as_status declare_log_constants(PyObject *aerospike);

/**
* Set log level for C-SDK
* aerospike.set_log_level( aerospike.LOG_LEVEL_WARN )
Expand Down
24 changes: 0 additions & 24 deletions src/include/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@
#include <aerospike/as_partition_filter.h>
#include <aerospike/as_metrics.h>

#define MAX_CONSTANT_STR_SIZE 512

/*
*******************************************************************************************************
*Structure to map constant number to constant name string for Aerospike constants.
*******************************************************************************************************
*/

enum Aerospike_serializer_values {
SERIALIZER_NONE, /* default handler for serializer type */
SERIALIZER_PYTHON,
Expand Down Expand Up @@ -193,20 +185,6 @@ enum aerospike_cdt_ctx_identifiers {
CDT_CTX_MAP_KEY_CREATE = 0x24
};

typedef struct Aerospike_Constants {
long constantno;
char constant_str[MAX_CONSTANT_STR_SIZE];
} AerospikeConstants;

typedef struct Aerospike_JobConstants {
char job_str[MAX_CONSTANT_STR_SIZE];
char exposed_job_str[MAX_CONSTANT_STR_SIZE];
} AerospikeJobConstants;
#define AEROSPIKE_CONSTANTS_ARR_SIZE \
(sizeof(aerospike_constants) / sizeof(AerospikeConstants))
#define AEROSPIKE_JOB_CONSTANTS_ARR_SIZE \
(sizeof(aerospike_job_constants) / sizeof(AerospikeJobConstants))

as_status pyobject_to_policy_admin(AerospikeClient *self, as_error *err,
PyObject *py_policy, as_policy_admin *policy,
as_policy_admin **policy_p,
Expand Down Expand Up @@ -270,8 +248,6 @@ as_status pyobject_to_policy_batch(AerospikeClient *self, as_error *err,
as_status pyobject_to_map_policy(as_error *err, PyObject *py_policy,
as_map_policy *policy);

as_status declare_policy_constants(PyObject *aerospike);

void set_scan_options(as_error *err, as_scan *scan_p, PyObject *py_options);

as_status set_query_options(as_error *err, PyObject *query_options,
Expand Down
3 changes: 3 additions & 0 deletions src/include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <aerospike/as_operations.h>
#include "pool.h"

#define AEROSPIKE_MODULE_NAME "aerospike"
#define FULLY_QUALIFIED_TYPE_NAME(name) AEROSPIKE_MODULE_NAME "." name

// Bin names can be of type Unicode in Python
// DB supports 32767 maximum number of bins
#define MAX_UNICODE_OBJECTS 32767
Expand Down
Loading

0 comments on commit fb52e27

Please sign in to comment.