Kùzu C API
|
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | ArrowSchema |
struct | ArrowArray |
struct | kuzu_system_config |
Stores runtime configuration for creating or opening a Database. More... | |
struct | kuzu_database |
kuzu_database manages all database components. More... | |
struct | kuzu_connection |
kuzu_connection is used to interact with a Database instance. Each connection is thread-safe. Multiple connections can connect to the same Database instance in a multi-threaded environment. More... | |
struct | kuzu_prepared_statement |
kuzu_prepared_statement is a parameterized query which can avoid planning the same query for repeated execution. More... | |
struct | kuzu_query_result |
kuzu_query_result stores the result of a query. More... | |
struct | kuzu_flat_tuple |
kuzu_flat_tuple stores a vector of values. More... | |
struct | kuzu_logical_type |
kuzu_logical_type is the kuzu internal representation of data types. More... | |
struct | kuzu_value |
kuzu_value is used to represent a value with any kuzu internal dataType. More... | |
struct | kuzu_internal_id_t |
kuzu internal internal_id type which stores the table_id and offset of a node/rel. More... | |
struct | kuzu_date_t |
kuzu internal date type which stores the number of days since 1970-01-01 00:00:00 UTC. More... | |
struct | kuzu_timestamp_ns_t |
kuzu internal timestamp_ns type which stores the number of nanoseconds since 1970-01-01 00:00:00 UTC. More... | |
struct | kuzu_timestamp_ms_t |
kuzu internal timestamp_ms type which stores the number of milliseconds since 1970-01-01 00:00:00 UTC. More... | |
struct | kuzu_timestamp_sec_t |
kuzu internal timestamp_sec_t type which stores the number of seconds since 1970-01-01 00:00:00 UTC. More... | |
struct | kuzu_timestamp_tz_t |
kuzu internal timestamp_tz type which stores the number of microseconds since 1970-01-01 with timezone 00:00:00 UTC. More... | |
struct | kuzu_timestamp_t |
kuzu internal timestamp type which stores the number of microseconds since 1970-01-01 00:00:00 UTC. More... | |
struct | kuzu_interval_t |
kuzu internal interval type which stores the months, days and microseconds. More... | |
struct | kuzu_query_summary |
kuzu_query_summary stores the execution time, plan, compiling time and query options of a query. More... | |
struct | kuzu_int128_t |
Macros | |
#define | KUZU_HELPER_DLL_IMPORT __attribute__((visibility("default"))) |
#define | KUZU_HELPER_DLL_EXPORT __attribute__((visibility("default"))) |
#define | KUZU_HELPER_DLL_LOCAL __attribute__((visibility("hidden"))) |
#define | KUZU_HELPER_DEPRECATED __attribute__((__deprecated__)) |
#define | KUZU_API KUZU_HELPER_DLL_IMPORT |
#define | KUZU_DEPRECATED KUZU_HELPER_DEPRECATED |
#define | KUZU_DEPRECATED_EXPORT KUZU_API KUZU_DEPRECATED |
#define | ARROW_C_DATA_INTERFACE |
#define | ARROW_FLAG_DICTIONARY_ORDERED 1 |
#define | ARROW_FLAG_NULLABLE 2 |
#define | ARROW_FLAG_MAP_KEYS_SORTED 4 |
#define | KUZU_C_API KUZU_API |
Enumerations | |
enum | kuzu_data_type_id { KUZU_ANY = 0 , KUZU_NODE = 10 , KUZU_REL = 11 , KUZU_RECURSIVE_REL = 12 , KUZU_SERIAL = 13 , KUZU_BOOL = 22 , KUZU_INT64 = 23 , KUZU_INT32 = 24 , KUZU_INT16 = 25 , KUZU_INT8 = 26 , KUZU_UINT64 = 27 , KUZU_UINT32 = 28 , KUZU_UINT16 = 29 , KUZU_UINT8 = 30 , KUZU_INT128 = 31 , KUZU_DOUBLE = 32 , KUZU_FLOAT = 33 , KUZU_DATE = 34 , KUZU_TIMESTAMP = 35 , KUZU_TIMESTAMP_SEC = 36 , KUZU_TIMESTAMP_MS = 37 , KUZU_TIMESTAMP_NS = 38 , KUZU_TIMESTAMP_TZ = 39 , KUZU_INTERVAL = 40 , KUZU_DECIMAL = 41 , KUZU_INTERNAL_ID = 42 , KUZU_STRING = 50 , KUZU_BLOB = 51 , KUZU_LIST = 52 , KUZU_ARRAY = 53 , KUZU_STRUCT = 54 , KUZU_MAP = 55 , KUZU_UNION = 56 , KUZU_POINTER = 58 , KUZU_UUID = 59 } |
enum class for kuzu internal dataTypes. More... | |
enum | kuzu_state { KuzuSuccess = 0 , KuzuError = 1 } |
enum class for kuzu function return state. More... | |
Functions | |
KUZU_C_API kuzu_state | kuzu_database_init (const char *database_path, kuzu_system_config system_config, kuzu_database *out_database) |
Allocates memory and creates a kuzu database instance at database_path with bufferPoolSize=buffer_pool_size. Caller is responsible for calling kuzu_database_destroy() to release the allocated memory. | |
KUZU_C_API void | kuzu_database_destroy (kuzu_database *database) |
Destroys the kuzu database instance and frees the allocated memory. | |
KUZU_C_API kuzu_system_config | kuzu_default_system_config () |
KUZU_C_API kuzu_state | kuzu_connection_init (kuzu_database *database, kuzu_connection *out_connection) |
Allocates memory and creates a connection to the database. Caller is responsible for calling kuzu_connection_destroy() to release the allocated memory. | |
KUZU_C_API void | kuzu_connection_destroy (kuzu_connection *connection) |
Destroys the connection instance and frees the allocated memory. | |
KUZU_C_API kuzu_state | kuzu_connection_set_max_num_thread_for_exec (kuzu_connection *connection, uint64_t num_threads) |
Sets the maximum number of threads to use for executing queries. | |
KUZU_C_API kuzu_state | kuzu_connection_get_max_num_thread_for_exec (kuzu_connection *connection, uint64_t *out_result) |
Returns the maximum number of threads of the connection to use for executing queries. | |
KUZU_C_API kuzu_state | kuzu_connection_query (kuzu_connection *connection, const char *query, kuzu_query_result *out_query_result) |
Executes the given query and returns the result. | |
KUZU_C_API kuzu_state | kuzu_connection_prepare (kuzu_connection *connection, const char *query, kuzu_prepared_statement *out_prepared_statement) |
Prepares the given query and returns the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_connection_execute (kuzu_connection *connection, kuzu_prepared_statement *prepared_statement, kuzu_query_result *out_query_result) |
Executes the prepared_statement using connection. | |
KUZU_C_API void | kuzu_connection_interrupt (kuzu_connection *connection) |
Interrupts the current query execution in the connection. | |
KUZU_C_API kuzu_state | kuzu_connection_set_query_timeout (kuzu_connection *connection, uint64_t timeout_in_ms) |
Sets query timeout value in milliseconds for the connection. | |
KUZU_C_API void | kuzu_prepared_statement_destroy (kuzu_prepared_statement *prepared_statement) |
Destroys the prepared statement instance and frees the allocated memory. | |
KUZU_C_API bool | kuzu_prepared_statement_is_success (kuzu_prepared_statement *prepared_statement) |
KUZU_C_API char * | kuzu_prepared_statement_get_error_message (kuzu_prepared_statement *prepared_statement) |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_bool (kuzu_prepared_statement *prepared_statement, const char *param_name, bool value) |
Binds the given boolean value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_int64 (kuzu_prepared_statement *prepared_statement, const char *param_name, int64_t value) |
Binds the given int64_t value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_int32 (kuzu_prepared_statement *prepared_statement, const char *param_name, int32_t value) |
Binds the given int32_t value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_int16 (kuzu_prepared_statement *prepared_statement, const char *param_name, int16_t value) |
Binds the given int16_t value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_int8 (kuzu_prepared_statement *prepared_statement, const char *param_name, int8_t value) |
Binds the given int8_t value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_uint64 (kuzu_prepared_statement *prepared_statement, const char *param_name, uint64_t value) |
Binds the given uint64_t value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_uint32 (kuzu_prepared_statement *prepared_statement, const char *param_name, uint32_t value) |
Binds the given uint32_t value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_uint16 (kuzu_prepared_statement *prepared_statement, const char *param_name, uint16_t value) |
Binds the given uint16_t value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_uint8 (kuzu_prepared_statement *prepared_statement, const char *param_name, uint8_t value) |
Binds the given int8_t value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_double (kuzu_prepared_statement *prepared_statement, const char *param_name, double value) |
Binds the given double value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_float (kuzu_prepared_statement *prepared_statement, const char *param_name, float value) |
Binds the given float value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_date (kuzu_prepared_statement *prepared_statement, const char *param_name, kuzu_date_t value) |
Binds the given date value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_timestamp_ns (kuzu_prepared_statement *prepared_statement, const char *param_name, kuzu_timestamp_ns_t value) |
Binds the given timestamp_ns value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_timestamp_sec (kuzu_prepared_statement *prepared_statement, const char *param_name, kuzu_timestamp_sec_t value) |
Binds the given timestamp_sec value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_timestamp_tz (kuzu_prepared_statement *prepared_statement, const char *param_name, kuzu_timestamp_tz_t value) |
Binds the given timestamp_tz value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_timestamp_ms (kuzu_prepared_statement *prepared_statement, const char *param_name, kuzu_timestamp_ms_t value) |
Binds the given timestamp_ms value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_timestamp (kuzu_prepared_statement *prepared_statement, const char *param_name, kuzu_timestamp_t value) |
Binds the given timestamp value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_interval (kuzu_prepared_statement *prepared_statement, const char *param_name, kuzu_interval_t value) |
Binds the given interval value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_string (kuzu_prepared_statement *prepared_statement, const char *param_name, const char *value) |
Binds the given string value to the given parameter name in the prepared statement. | |
KUZU_C_API kuzu_state | kuzu_prepared_statement_bind_value (kuzu_prepared_statement *prepared_statement, const char *param_name, kuzu_value *value) |
Binds the given kuzu value to the given parameter name in the prepared statement. | |
KUZU_C_API void | kuzu_query_result_destroy (kuzu_query_result *query_result) |
Destroys the given query result instance. | |
KUZU_C_API bool | kuzu_query_result_is_success (kuzu_query_result *query_result) |
Returns true if the query is executed successful, false otherwise. | |
KUZU_C_API char * | kuzu_query_result_get_error_message (kuzu_query_result *query_result) |
Returns the error message if the query is failed. | |
KUZU_C_API uint64_t | kuzu_query_result_get_num_columns (kuzu_query_result *query_result) |
Returns the number of columns in the query result. | |
KUZU_C_API kuzu_state | kuzu_query_result_get_column_name (kuzu_query_result *query_result, uint64_t index, char **out_column_name) |
Returns the column name at the given index. | |
KUZU_C_API kuzu_state | kuzu_query_result_get_column_data_type (kuzu_query_result *query_result, uint64_t index, kuzu_logical_type *out_column_data_type) |
Returns the data type of the column at the given index. | |
KUZU_C_API uint64_t | kuzu_query_result_get_num_tuples (kuzu_query_result *query_result) |
Returns the number of tuples in the query result. | |
KUZU_C_API kuzu_state | kuzu_query_result_get_query_summary (kuzu_query_result *query_result, kuzu_query_summary *out_query_summary) |
Returns the query summary of the query result. | |
KUZU_C_API bool | kuzu_query_result_has_next (kuzu_query_result *query_result) |
Returns true if we have not consumed all tuples in the query result, false otherwise. | |
KUZU_C_API kuzu_state | kuzu_query_result_get_next (kuzu_query_result *query_result, kuzu_flat_tuple *out_flat_tuple) |
Returns the next tuple in the query result. Throws an exception if there is no more tuple. | |
KUZU_C_API bool | kuzu_query_result_has_next_query_result (kuzu_query_result *query_result) |
Returns true if we have not consumed all query results, false otherwise. Use this function for loop results of multiple query statements. | |
KUZU_C_API kuzu_state | kuzu_query_result_get_next_query_result (kuzu_query_result *query_result, kuzu_query_result *out_next_query_result) |
Returns the next query result. Use this function to loop multiple query statements' results. | |
KUZU_C_API char * | kuzu_query_result_to_string (kuzu_query_result *query_result) |
Returns the query result as a string. | |
KUZU_C_API void | kuzu_query_result_reset_iterator (kuzu_query_result *query_result) |
Resets the iterator of the query result to the beginning of the query result. | |
KUZU_C_API kuzu_state | kuzu_query_result_get_arrow_schema (kuzu_query_result *query_result, struct ArrowSchema *out_schema) |
Returns the query result's schema as ArrowSchema. | |
KUZU_C_API kuzu_state | kuzu_query_result_get_next_arrow_chunk (kuzu_query_result *query_result, int64_t chunk_size, struct ArrowArray *out_arrow_array) |
Returns the next chunk of the query result as ArrowArray. | |
KUZU_C_API void | kuzu_flat_tuple_destroy (kuzu_flat_tuple *flat_tuple) |
Destroys the given flat tuple instance. | |
KUZU_C_API kuzu_state | kuzu_flat_tuple_get_value (kuzu_flat_tuple *flat_tuple, uint64_t index, kuzu_value *out_value) |
Returns the value at index of the flat tuple. | |
KUZU_C_API char * | kuzu_flat_tuple_to_string (kuzu_flat_tuple *flat_tuple) |
Converts the flat tuple to a string. | |
KUZU_C_API void | kuzu_data_type_create (kuzu_data_type_id id, kuzu_logical_type *child_type, uint64_t num_elements_in_array, kuzu_logical_type *out_type) |
Creates a data type instance with the given id, childType and num_elements_in_array. Caller is responsible for destroying the returned data type instance. | |
KUZU_C_API void | kuzu_data_type_clone (kuzu_logical_type *data_type, kuzu_logical_type *out_type) |
Creates a new data type instance by cloning the given data type instance. | |
KUZU_C_API void | kuzu_data_type_destroy (kuzu_logical_type *data_type) |
Destroys the given data type instance. | |
KUZU_C_API bool | kuzu_data_type_equals (kuzu_logical_type *data_type1, kuzu_logical_type *data_type2) |
Returns true if the given data type is equal to the other data type, false otherwise. | |
KUZU_C_API kuzu_data_type_id | kuzu_data_type_get_id (kuzu_logical_type *data_type) |
Returns the enum type id of the given data type. | |
KUZU_C_API kuzu_state | kuzu_data_type_get_num_elements_in_array (kuzu_logical_type *data_type, uint64_t *out_result) |
Returns the number of elements for array. | |
KUZU_C_API kuzu_value * | kuzu_value_create_null () |
Creates a NULL value of ANY type. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_null_with_data_type (kuzu_logical_type *data_type) |
Creates a value of the given data type. Caller is responsible for destroying the returned value. | |
KUZU_C_API bool | kuzu_value_is_null (kuzu_value *value) |
Returns true if the given value is NULL, false otherwise. | |
KUZU_C_API void | kuzu_value_set_null (kuzu_value *value, bool is_null) |
Sets the given value to NULL or not. | |
KUZU_C_API kuzu_value * | kuzu_value_create_default (kuzu_logical_type *data_type) |
Creates a value of the given data type with default non-NULL value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_bool (bool val_) |
Creates a value with boolean type and the given bool value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_int8 (int8_t val_) |
Creates a value with int8 type and the given int8 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_int16 (int16_t val_) |
Creates a value with int16 type and the given int16 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_int32 (int32_t val_) |
Creates a value with int32 type and the given int32 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_int64 (int64_t val_) |
Creates a value with int64 type and the given int64 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_uint8 (uint8_t val_) |
Creates a value with uint8 type and the given uint8 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_uint16 (uint16_t val_) |
Creates a value with uint16 type and the given uint16 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_uint32 (uint32_t val_) |
Creates a value with uint32 type and the given uint32 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_uint64 (uint64_t val_) |
Creates a value with uint64 type and the given uint64 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_int128 (kuzu_int128_t val_) |
Creates a value with int128 type and the given int128 value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_float (float val_) |
Creates a value with float type and the given float value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_double (double val_) |
Creates a value with double type and the given double value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_internal_id (kuzu_internal_id_t val_) |
Creates a value with internal_id type and the given internal_id value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_date (kuzu_date_t val_) |
Creates a value with date type and the given date value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_timestamp_ns (kuzu_timestamp_ns_t val_) |
Creates a value with timestamp_ns type and the given timestamp value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_timestamp_ms (kuzu_timestamp_ms_t val_) |
Creates a value with timestamp_ms type and the given timestamp value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_timestamp_sec (kuzu_timestamp_sec_t val_) |
Creates a value with timestamp_sec type and the given timestamp value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_timestamp_tz (kuzu_timestamp_tz_t val_) |
Creates a value with timestamp_tz type and the given timestamp value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_timestamp (kuzu_timestamp_t val_) |
Creates a value with timestamp type and the given timestamp value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_interval (kuzu_interval_t val_) |
Creates a value with interval type and the given interval value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_create_string (const char *val_) |
Creates a value with string type and the given string value. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_state | kuzu_value_create_list (uint64_t num_elements, kuzu_value **elements, kuzu_value **out_value) |
Creates a list value with the given number of elements and the given elements. The caller needs to make sure that all elements have the same type. The elements are copied into the list value, so destroying the elements after creating the list value is safe. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_state | kuzu_value_create_struct (uint64_t num_fields, const char **field_names, kuzu_value **field_values, kuzu_value **out_value) |
Creates a struct value with the given number of fields and the given field names and values. The caller needs to make sure that all field names are unique. The field names and values are copied into the struct value, so destroying the field names and values after creating the struct value is safe. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_state | kuzu_value_create_map (uint64_t num_fields, kuzu_value **keys, kuzu_value **values, kuzu_value **out_value) |
Creates a map value with the given number of fields and the given keys and values. The caller needs to make sure that all keys are unique, and all keys and values have the same type. The keys and values are copied into the map value, so destroying the keys and values after creating the map value is safe. Caller is responsible for destroying the returned value. | |
KUZU_C_API kuzu_value * | kuzu_value_clone (kuzu_value *value) |
Creates a new value based on the given value. Caller is responsible for destroying the returned value. | |
KUZU_C_API void | kuzu_value_copy (kuzu_value *value, kuzu_value *other) |
Copies the other value to the value. | |
KUZU_C_API void | kuzu_value_destroy (kuzu_value *value) |
Destroys the value. | |
KUZU_C_API kuzu_state | kuzu_value_get_list_size (kuzu_value *value, uint64_t *out_result) |
Returns the number of elements per list of the given value. The value must be of type ARRAY. | |
KUZU_C_API kuzu_state | kuzu_value_get_list_element (kuzu_value *value, uint64_t index, kuzu_value *out_value) |
Returns the element at index of the given value. The value must be of type LIST. | |
KUZU_C_API kuzu_state | kuzu_value_get_struct_num_fields (kuzu_value *value, uint64_t *out_result) |
Returns the number of fields of the given struct value. The value must be of type STRUCT. | |
KUZU_C_API kuzu_state | kuzu_value_get_struct_field_name (kuzu_value *value, uint64_t index, char **out_result) |
Returns the field name at index of the given struct value. The value must be of physical type STRUCT (STRUCT, NODE, REL, RECURSIVE_REL, UNION). | |
KUZU_C_API kuzu_state | kuzu_value_get_struct_field_value (kuzu_value *value, uint64_t index, kuzu_value *out_value) |
Returns the field value at index of the given struct value. The value must be of physical type STRUCT (STRUCT, NODE, REL, RECURSIVE_REL, UNION). | |
KUZU_C_API kuzu_state | kuzu_value_get_map_size (kuzu_value *value, uint64_t *out_result) |
Returns the size of the given map value. The value must be of type MAP. | |
KUZU_C_API kuzu_state | kuzu_value_get_map_key (kuzu_value *value, uint64_t index, kuzu_value *out_key) |
Returns the key at index of the given map value. The value must be of physical type MAP. | |
KUZU_C_API kuzu_state | kuzu_value_get_map_value (kuzu_value *value, uint64_t index, kuzu_value *out_value) |
Returns the field value at index of the given map value. The value must be of physical type MAP. | |
KUZU_C_API kuzu_state | kuzu_value_get_recursive_rel_node_list (kuzu_value *value, kuzu_value *out_value) |
Returns the list of nodes for recursive rel value. The value must be of type RECURSIVE_REL. | |
KUZU_C_API kuzu_state | kuzu_value_get_recursive_rel_rel_list (kuzu_value *value, kuzu_value *out_value) |
Returns the list of rels for recursive rel value. The value must be of type RECURSIVE_REL. | |
KUZU_C_API void | kuzu_value_get_data_type (kuzu_value *value, kuzu_logical_type *out_type) |
Returns internal type of the given value. | |
KUZU_C_API kuzu_state | kuzu_value_get_bool (kuzu_value *value, bool *out_result) |
Returns the boolean value of the given value. The value must be of type BOOL. | |
KUZU_C_API kuzu_state | kuzu_value_get_int8 (kuzu_value *value, int8_t *out_result) |
Returns the int8 value of the given value. The value must be of type INT8. | |
KUZU_C_API kuzu_state | kuzu_value_get_int16 (kuzu_value *value, int16_t *out_result) |
Returns the int16 value of the given value. The value must be of type INT16. | |
KUZU_C_API kuzu_state | kuzu_value_get_int32 (kuzu_value *value, int32_t *out_result) |
Returns the int32 value of the given value. The value must be of type INT32. | |
KUZU_C_API kuzu_state | kuzu_value_get_int64 (kuzu_value *value, int64_t *out_result) |
Returns the int64 value of the given value. The value must be of type INT64 or SERIAL. | |
KUZU_C_API kuzu_state | kuzu_value_get_uint8 (kuzu_value *value, uint8_t *out_result) |
Returns the uint8 value of the given value. The value must be of type UINT8. | |
KUZU_C_API kuzu_state | kuzu_value_get_uint16 (kuzu_value *value, uint16_t *out_result) |
Returns the uint16 value of the given value. The value must be of type UINT16. | |
KUZU_C_API kuzu_state | kuzu_value_get_uint32 (kuzu_value *value, uint32_t *out_result) |
Returns the uint32 value of the given value. The value must be of type UINT32. | |
KUZU_C_API kuzu_state | kuzu_value_get_uint64 (kuzu_value *value, uint64_t *out_result) |
Returns the uint64 value of the given value. The value must be of type UINT64. | |
KUZU_C_API kuzu_state | kuzu_value_get_int128 (kuzu_value *value, kuzu_int128_t *out_result) |
Returns the int128 value of the given value. The value must be of type INT128. | |
KUZU_C_API kuzu_state | kuzu_int128_t_from_string (const char *str, kuzu_int128_t *out_result) |
convert a string to int128 value. | |
KUZU_C_API kuzu_state | kuzu_int128_t_to_string (kuzu_int128_t val, char **out_result) |
convert int128 to corresponding string. | |
KUZU_C_API kuzu_state | kuzu_value_get_float (kuzu_value *value, float *out_result) |
Returns the float value of the given value. The value must be of type FLOAT. | |
KUZU_C_API kuzu_state | kuzu_value_get_double (kuzu_value *value, double *out_result) |
Returns the double value of the given value. The value must be of type DOUBLE. | |
KUZU_C_API kuzu_state | kuzu_value_get_internal_id (kuzu_value *value, kuzu_internal_id_t *out_result) |
Returns the internal id value of the given value. The value must be of type INTERNAL_ID. | |
KUZU_C_API kuzu_state | kuzu_value_get_date (kuzu_value *value, kuzu_date_t *out_result) |
Returns the date value of the given value. The value must be of type DATE. | |
KUZU_C_API kuzu_state | kuzu_value_get_timestamp (kuzu_value *value, kuzu_timestamp_t *out_result) |
Returns the timestamp value of the given value. The value must be of type TIMESTAMP. | |
KUZU_C_API kuzu_state | kuzu_value_get_timestamp_ns (kuzu_value *value, kuzu_timestamp_ns_t *out_result) |
Returns the timestamp_ns value of the given value. The value must be of type TIMESTAMP_NS. | |
KUZU_C_API kuzu_state | kuzu_value_get_timestamp_ms (kuzu_value *value, kuzu_timestamp_ms_t *out_result) |
Returns the timestamp_ms value of the given value. The value must be of type TIMESTAMP_MS. | |
KUZU_C_API kuzu_state | kuzu_value_get_timestamp_sec (kuzu_value *value, kuzu_timestamp_sec_t *out_result) |
Returns the timestamp_sec value of the given value. The value must be of type TIMESTAMP_SEC. | |
KUZU_C_API kuzu_state | kuzu_value_get_timestamp_tz (kuzu_value *value, kuzu_timestamp_tz_t *out_result) |
Returns the timestamp_tz value of the given value. The value must be of type TIMESTAMP_TZ. | |
KUZU_C_API kuzu_state | kuzu_value_get_interval (kuzu_value *value, kuzu_interval_t *out_result) |
Returns the interval value of the given value. The value must be of type INTERVAL. | |
KUZU_C_API kuzu_state | kuzu_value_get_decimal_as_string (kuzu_value *value, char **out_result) |
Returns the decimal value of the given value as a string. The value must be of type DECIMAL. | |
KUZU_C_API kuzu_state | kuzu_value_get_string (kuzu_value *value, char **out_result) |
Returns the string value of the given value. The value must be of type STRING. | |
KUZU_C_API kuzu_state | kuzu_value_get_blob (kuzu_value *value, uint8_t **out_result) |
Returns the blob value of the given value. The returned buffer is null-terminated similar to a string. The value must be of type BLOB. | |
KUZU_C_API kuzu_state | kuzu_value_get_uuid (kuzu_value *value, char **out_result) |
Returns the uuid value of the given value. to a string. The value must be of type UUID. | |
KUZU_C_API char * | kuzu_value_to_string (kuzu_value *value) |
Converts the given value to string. | |
KUZU_C_API kuzu_state | kuzu_node_val_get_id_val (kuzu_value *node_val, kuzu_value *out_value) |
Returns the internal id value of the given node value as a kuzu value. | |
KUZU_C_API kuzu_state | kuzu_node_val_get_label_val (kuzu_value *node_val, kuzu_value *out_value) |
Returns the label value of the given node value as a label value. | |
KUZU_C_API kuzu_state | kuzu_node_val_get_property_size (kuzu_value *node_val, uint64_t *out_value) |
Returns the number of properties of the given node value. | |
KUZU_C_API kuzu_state | kuzu_node_val_get_property_name_at (kuzu_value *node_val, uint64_t index, char **out_result) |
Returns the property name of the given node value at the given index. | |
KUZU_C_API kuzu_state | kuzu_node_val_get_property_value_at (kuzu_value *node_val, uint64_t index, kuzu_value *out_value) |
Returns the property value of the given node value at the given index. | |
KUZU_C_API kuzu_state | kuzu_node_val_to_string (kuzu_value *node_val, char **out_result) |
Converts the given node value to string. | |
KUZU_C_API kuzu_state | kuzu_rel_val_get_src_id_val (kuzu_value *rel_val, kuzu_value *out_value) |
Returns the internal id value of the source node of the given rel value as a kuzu value. | |
KUZU_C_API kuzu_state | kuzu_rel_val_get_dst_id_val (kuzu_value *rel_val, kuzu_value *out_value) |
Returns the internal id value of the destination node of the given rel value as a kuzu value. | |
KUZU_C_API kuzu_state | kuzu_rel_val_get_label_val (kuzu_value *rel_val, kuzu_value *out_value) |
Returns the label value of the given rel value. | |
KUZU_C_API kuzu_state | kuzu_rel_val_get_property_size (kuzu_value *rel_val, uint64_t *out_value) |
Returns the number of properties of the given rel value. | |
KUZU_C_API kuzu_state | kuzu_rel_val_get_property_name_at (kuzu_value *rel_val, uint64_t index, char **out_result) |
Returns the property name of the given rel value at the given index. | |
KUZU_C_API kuzu_state | kuzu_rel_val_get_property_value_at (kuzu_value *rel_val, uint64_t index, kuzu_value *out_value) |
Returns the property of the given rel value at the given index as kuzu value. | |
KUZU_C_API kuzu_state | kuzu_rel_val_to_string (kuzu_value *rel_val, char **out_result) |
Converts the given rel value to string. | |
KUZU_C_API void | kuzu_destroy_string (char *str) |
Destroys any string created by the Kùzu C API, including both the error message and the values returned by the API functions. This function is provided to avoid the inconsistency between the memory allocation and deallocation across different libraries and is preferred over using the standard C free function. | |
KUZU_C_API void | kuzu_destroy_blob (uint8_t *blob) |
Destroys any blob created by the Kùzu C API. This function is provided to avoid the inconsistency between the memory allocation and deallocation across different libraries and is preferred over using the standard C free function. | |
KUZU_C_API void | kuzu_query_summary_destroy (kuzu_query_summary *query_summary) |
Destroys the given query summary. | |
KUZU_C_API double | kuzu_query_summary_get_compiling_time (kuzu_query_summary *query_summary) |
Returns the compilation time of the given query summary in milliseconds. | |
KUZU_C_API double | kuzu_query_summary_get_execution_time (kuzu_query_summary *query_summary) |
Returns the execution time of the given query summary in milliseconds. | |
KUZU_C_API kuzu_state | kuzu_timestamp_ns_to_tm (kuzu_timestamp_ns_t timestamp, struct tm *out_result) |
Convert timestamp_ns to corresponding tm struct. | |
KUZU_C_API kuzu_state | kuzu_timestamp_ms_to_tm (kuzu_timestamp_ms_t timestamp, struct tm *out_result) |
Convert timestamp_ms to corresponding tm struct. | |
KUZU_C_API kuzu_state | kuzu_timestamp_sec_to_tm (kuzu_timestamp_sec_t timestamp, struct tm *out_result) |
Convert timestamp_sec to corresponding tm struct. | |
KUZU_C_API kuzu_state | kuzu_timestamp_tz_to_tm (kuzu_timestamp_tz_t timestamp, struct tm *out_result) |
Convert timestamp_tz to corresponding tm struct. | |
KUZU_C_API kuzu_state | kuzu_timestamp_to_tm (kuzu_timestamp_t timestamp, struct tm *out_result) |
Convert timestamp to corresponding tm struct. | |
KUZU_C_API kuzu_state | kuzu_timestamp_ns_from_tm (struct tm tm, kuzu_timestamp_ns_t *out_result) |
Convert tm struct to timestamp_ns value. | |
KUZU_C_API kuzu_state | kuzu_timestamp_ms_from_tm (struct tm tm, kuzu_timestamp_ms_t *out_result) |
Convert tm struct to timestamp_ms value. | |
KUZU_C_API kuzu_state | kuzu_timestamp_sec_from_tm (struct tm tm, kuzu_timestamp_sec_t *out_result) |
Convert tm struct to timestamp_sec value. | |
KUZU_C_API kuzu_state | kuzu_timestamp_tz_from_tm (struct tm tm, kuzu_timestamp_tz_t *out_result) |
Convert tm struct to timestamp_tz value. | |
KUZU_C_API kuzu_state | kuzu_timestamp_from_tm (struct tm tm, kuzu_timestamp_t *out_result) |
Convert timestamp_ns to corresponding string. | |
KUZU_C_API kuzu_state | kuzu_date_to_string (kuzu_date_t date, char **out_result) |
Convert date to corresponding string. | |
KUZU_C_API kuzu_state | kuzu_date_from_string (const char *str, kuzu_date_t *out_result) |
Convert a string to date value. | |
KUZU_C_API kuzu_state | kuzu_date_to_tm (kuzu_date_t date, struct tm *out_result) |
Convert date to corresponding tm struct. | |
KUZU_C_API kuzu_state | kuzu_date_from_tm (struct tm tm, kuzu_date_t *out_result) |
Convert tm struct to date value. | |
KUZU_C_API void | kuzu_interval_to_difftime (kuzu_interval_t interval, double *out_result) |
Convert interval to corresponding difftime value in seconds. | |
KUZU_C_API void | kuzu_interval_from_difftime (double difftime, kuzu_interval_t *out_result) |
Convert difftime value in seconds to interval. | |
KUZU_C_API char * | kuzu_get_version () |
Returns the version of the Kùzu library. | |
KUZU_C_API uint64_t | kuzu_get_storage_version () |
Returns the storage version of the Kùzu library. | |
#define ARROW_C_DATA_INTERFACE |
#define ARROW_FLAG_DICTIONARY_ORDERED 1 |
#define ARROW_FLAG_MAP_KEYS_SORTED 4 |
#define ARROW_FLAG_NULLABLE 2 |
#define KUZU_API KUZU_HELPER_DLL_IMPORT |
#define KUZU_C_API KUZU_API |
#define KUZU_DEPRECATED KUZU_HELPER_DEPRECATED |
#define KUZU_DEPRECATED_EXPORT KUZU_API KUZU_DEPRECATED |
#define KUZU_HELPER_DEPRECATED __attribute__((__deprecated__)) |
#define KUZU_HELPER_DLL_EXPORT __attribute__((visibility("default"))) |
#define KUZU_HELPER_DLL_IMPORT __attribute__((visibility("default"))) |
#define KUZU_HELPER_DLL_LOCAL __attribute__((visibility("hidden"))) |
enum kuzu_data_type_id |
enum class for kuzu internal dataTypes.
enum kuzu_state |
KUZU_C_API void kuzu_connection_destroy | ( | kuzu_connection * | connection | ) |
Destroys the connection instance and frees the allocated memory.
connection | The connection instance to destroy. |
KUZU_C_API kuzu_state kuzu_connection_execute | ( | kuzu_connection * | connection, |
kuzu_prepared_statement * | prepared_statement, | ||
kuzu_query_result * | out_query_result ) |
Executes the prepared_statement using connection.
connection | The connection instance to execute the prepared_statement. | |
prepared_statement | The prepared statement to execute. | |
[out] | out_query_result | The output parameter that will hold the result of the query. |
KUZU_C_API kuzu_state kuzu_connection_get_max_num_thread_for_exec | ( | kuzu_connection * | connection, |
uint64_t * | out_result ) |
Returns the maximum number of threads of the connection to use for executing queries.
connection | The connection instance to return max number of threads for execution. | |
[out] | out_result | The output parameter that will hold the maximum number of threads to use for executing queries. |
KUZU_C_API kuzu_state kuzu_connection_init | ( | kuzu_database * | database, |
kuzu_connection * | out_connection ) |
Allocates memory and creates a connection to the database. Caller is responsible for calling kuzu_connection_destroy() to release the allocated memory.
database | The database instance to connect to. | |
[out] | out_connection | The output parameter that will hold the connection instance. |
KUZU_C_API void kuzu_connection_interrupt | ( | kuzu_connection * | connection | ) |
Interrupts the current query execution in the connection.
connection | The connection instance to interrupt. |
KUZU_C_API kuzu_state kuzu_connection_prepare | ( | kuzu_connection * | connection, |
const char * | query, | ||
kuzu_prepared_statement * | out_prepared_statement ) |
Prepares the given query and returns the prepared statement.
connection | The connection instance to prepare the query. | |
query | The query to prepare. | |
[out] | out_prepared_statement | The output parameter that will hold the prepared statement. |
KUZU_C_API kuzu_state kuzu_connection_query | ( | kuzu_connection * | connection, |
const char * | query, | ||
kuzu_query_result * | out_query_result ) |
Executes the given query and returns the result.
connection | The connection instance to execute the query. | |
query | The query to execute. | |
[out] | out_query_result | The output parameter that will hold the result of the query. |
KUZU_C_API kuzu_state kuzu_connection_set_max_num_thread_for_exec | ( | kuzu_connection * | connection, |
uint64_t | num_threads ) |
Sets the maximum number of threads to use for executing queries.
connection | The connection instance to set max number of threads for execution. |
num_threads | The maximum number of threads to use for executing queries. |
KUZU_C_API kuzu_state kuzu_connection_set_query_timeout | ( | kuzu_connection * | connection, |
uint64_t | timeout_in_ms ) |
Sets query timeout value in milliseconds for the connection.
connection | The connection instance to set query timeout value. |
timeout_in_ms | The timeout value in milliseconds. |
KUZU_C_API void kuzu_data_type_clone | ( | kuzu_logical_type * | data_type, |
kuzu_logical_type * | out_type ) |
Creates a new data type instance by cloning the given data type instance.
data_type | The data type instance to clone. | |
[out] | out_type | The output parameter that will hold the cloned data type instance. |
KUZU_C_API void kuzu_data_type_create | ( | kuzu_data_type_id | id, |
kuzu_logical_type * | child_type, | ||
uint64_t | num_elements_in_array, | ||
kuzu_logical_type * | out_type ) |
Creates a data type instance with the given id, childType and num_elements_in_array. Caller is responsible for destroying the returned data type instance.
id | The enum type id of the datatype to create. | |
child_type | The child type of the datatype to create(only used for nested dataTypes). | |
num_elements_in_array | The number of elements in the array(only used for ARRAY). | |
[out] | out_type | The output parameter that will hold the data type instance. |
KUZU_C_API void kuzu_data_type_destroy | ( | kuzu_logical_type * | data_type | ) |
Destroys the given data type instance.
data_type | The data type instance to destroy. |
KUZU_C_API bool kuzu_data_type_equals | ( | kuzu_logical_type * | data_type1, |
kuzu_logical_type * | data_type2 ) |
Returns true if the given data type is equal to the other data type, false otherwise.
data_type1 | The first data type instance to compare. |
data_type2 | The second data type instance to compare. |
KUZU_C_API kuzu_data_type_id kuzu_data_type_get_id | ( | kuzu_logical_type * | data_type | ) |
Returns the enum type id of the given data type.
data_type | The data type instance to return. |
KUZU_C_API kuzu_state kuzu_data_type_get_num_elements_in_array | ( | kuzu_logical_type * | data_type, |
uint64_t * | out_result ) |
Returns the number of elements for array.
data_type | The data type instance to return. | |
[out] | out_result | The output parameter that will hold the number of elements in the array. |
KUZU_C_API void kuzu_database_destroy | ( | kuzu_database * | database | ) |
Destroys the kuzu database instance and frees the allocated memory.
database | The database instance to destroy. |
KUZU_C_API kuzu_state kuzu_database_init | ( | const char * | database_path, |
kuzu_system_config | system_config, | ||
kuzu_database * | out_database ) |
Allocates memory and creates a kuzu database instance at database_path with bufferPoolSize=buffer_pool_size. Caller is responsible for calling kuzu_database_destroy() to release the allocated memory.
database_path | The path to the database. | |
system_config | The runtime configuration for creating or opening the database. | |
[out] | out_database | The output parameter that will hold the database instance. |
KUZU_C_API kuzu_state kuzu_date_from_string | ( | const char * | str, |
kuzu_date_t * | out_result ) |
Convert a string to date value.
str | The string to convert. | |
[out] | out_result | The output parameter that will hold the date value. |
KUZU_C_API kuzu_state kuzu_date_from_tm | ( | struct tm | tm, |
kuzu_date_t * | out_result ) |
Convert tm struct to date value.
tm | The tm struct to convert. | |
[out] | out_result | The output parameter that will hold the date value. |
KUZU_C_API kuzu_state kuzu_date_to_string | ( | kuzu_date_t | date, |
char ** | out_result ) |
Convert date to corresponding string.
date | The date value to convert. | |
[out] | out_result | The output parameter that will hold the string value. |
KUZU_C_API kuzu_state kuzu_date_to_tm | ( | kuzu_date_t | date, |
struct tm * | out_result ) |
Convert date to corresponding tm struct.
date | The date value to convert. | |
[out] | out_result | The output parameter that will hold the tm struct. |
KUZU_C_API kuzu_system_config kuzu_default_system_config | ( | ) |
KUZU_C_API void kuzu_destroy_blob | ( | uint8_t * | blob | ) |
Destroys any blob created by the Kùzu C API. This function is provided to avoid the inconsistency between the memory allocation and deallocation across different libraries and is preferred over using the standard C free function.
blob | The blob to destroy. |
KUZU_C_API void kuzu_destroy_string | ( | char * | str | ) |
Destroys any string created by the Kùzu C API, including both the error message and the values returned by the API functions. This function is provided to avoid the inconsistency between the memory allocation and deallocation across different libraries and is preferred over using the standard C free function.
str | The string to destroy. |
KUZU_C_API void kuzu_flat_tuple_destroy | ( | kuzu_flat_tuple * | flat_tuple | ) |
Destroys the given flat tuple instance.
flat_tuple | The flat tuple instance to destroy. |
KUZU_C_API kuzu_state kuzu_flat_tuple_get_value | ( | kuzu_flat_tuple * | flat_tuple, |
uint64_t | index, | ||
kuzu_value * | out_value ) |
Returns the value at index of the flat tuple.
flat_tuple | The flat tuple instance to return. | |
index | The index of the value to return. | |
[out] | out_value | The output parameter that will hold the value at index. |
KUZU_C_API char * kuzu_flat_tuple_to_string | ( | kuzu_flat_tuple * | flat_tuple | ) |
Converts the flat tuple to a string.
flat_tuple | The flat tuple instance to convert. |
KUZU_C_API uint64_t kuzu_get_storage_version | ( | ) |
Returns the storage version of the Kùzu library.
KUZU_C_API char * kuzu_get_version | ( | ) |
Returns the version of the Kùzu library.
KUZU_C_API kuzu_state kuzu_int128_t_from_string | ( | const char * | str, |
kuzu_int128_t * | out_result ) |
convert a string to int128 value.
str | The string to convert. | |
[out] | out_result | The output parameter that will hold the int128 value. |
KUZU_C_API kuzu_state kuzu_int128_t_to_string | ( | kuzu_int128_t | val, |
char ** | out_result ) |
convert int128 to corresponding string.
val | The int128 value to convert. | |
[out] | out_result | The output parameter that will hold the string value. |
KUZU_C_API void kuzu_interval_from_difftime | ( | double | difftime, |
kuzu_interval_t * | out_result ) |
Convert difftime value in seconds to interval.
difftime | The difftime value to convert. | |
[out] | out_result | The output parameter that will hold the interval value. |
KUZU_C_API void kuzu_interval_to_difftime | ( | kuzu_interval_t | interval, |
double * | out_result ) |
Convert interval to corresponding difftime value in seconds.
interval | The interval value to convert. | |
[out] | out_result | The output parameter that will hold the difftime value. |
KUZU_C_API kuzu_state kuzu_node_val_get_id_val | ( | kuzu_value * | node_val, |
kuzu_value * | out_value ) |
Returns the internal id value of the given node value as a kuzu value.
node_val | The node value to return. | |
[out] | out_value | The output parameter that will hold the internal id value. |
KUZU_C_API kuzu_state kuzu_node_val_get_label_val | ( | kuzu_value * | node_val, |
kuzu_value * | out_value ) |
Returns the label value of the given node value as a label value.
node_val | The node value to return. | |
[out] | out_value | The output parameter that will hold the label value. |
KUZU_C_API kuzu_state kuzu_node_val_get_property_name_at | ( | kuzu_value * | node_val, |
uint64_t | index, | ||
char ** | out_result ) |
Returns the property name of the given node value at the given index.
node_val | The node value to return. | |
index | The index of the property. | |
[out] | out_result | The output parameter that will hold the property name at index. |
KUZU_C_API kuzu_state kuzu_node_val_get_property_size | ( | kuzu_value * | node_val, |
uint64_t * | out_value ) |
Returns the number of properties of the given node value.
node_val | The node value to return. | |
[out] | out_value | The output parameter that will hold the number of properties. |
KUZU_C_API kuzu_state kuzu_node_val_get_property_value_at | ( | kuzu_value * | node_val, |
uint64_t | index, | ||
kuzu_value * | out_value ) |
Returns the property value of the given node value at the given index.
node_val | The node value to return. | |
index | The index of the property. | |
[out] | out_value | The output parameter that will hold the property value at index. |
KUZU_C_API kuzu_state kuzu_node_val_to_string | ( | kuzu_value * | node_val, |
char ** | out_result ) |
Converts the given node value to string.
node_val | The node value to convert. | |
[out] | out_result | The output parameter that will hold the node value as a string. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_bool | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
bool | value ) |
Binds the given boolean value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The boolean value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_date | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
kuzu_date_t | value ) |
Binds the given date value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The date value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_double | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
double | value ) |
Binds the given double value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The double value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_float | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
float | value ) |
Binds the given float value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The float value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_int16 | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
int16_t | value ) |
Binds the given int16_t value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The int16_t value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_int32 | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
int32_t | value ) |
Binds the given int32_t value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The int32_t value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_int64 | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
int64_t | value ) |
Binds the given int64_t value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The int64_t value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_int8 | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
int8_t | value ) |
Binds the given int8_t value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The int8_t value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_interval | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
kuzu_interval_t | value ) |
Binds the given interval value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The interval value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_string | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
const char * | value ) |
Binds the given string value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The string value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_timestamp | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
kuzu_timestamp_t | value ) |
Binds the given timestamp value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The timestamp value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_timestamp_ms | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
kuzu_timestamp_ms_t | value ) |
Binds the given timestamp_ms value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The timestamp_ms value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_timestamp_ns | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
kuzu_timestamp_ns_t | value ) |
Binds the given timestamp_ns value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The timestamp_ns value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_timestamp_sec | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
kuzu_timestamp_sec_t | value ) |
Binds the given timestamp_sec value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The timestamp_sec value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_timestamp_tz | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
kuzu_timestamp_tz_t | value ) |
Binds the given timestamp_tz value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The timestamp_tz value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_uint16 | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
uint16_t | value ) |
Binds the given uint16_t value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The uint16_t value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_uint32 | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
uint32_t | value ) |
Binds the given uint32_t value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The uint32_t value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_uint64 | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
uint64_t | value ) |
Binds the given uint64_t value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The uint64_t value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_uint8 | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
uint8_t | value ) |
Binds the given int8_t value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The int8_t value to bind. |
KUZU_C_API kuzu_state kuzu_prepared_statement_bind_value | ( | kuzu_prepared_statement * | prepared_statement, |
const char * | param_name, | ||
kuzu_value * | value ) |
Binds the given kuzu value to the given parameter name in the prepared statement.
prepared_statement | The prepared statement instance to bind the value. |
param_name | The parameter name to bind the value. |
value | The kuzu value to bind. |
KUZU_C_API void kuzu_prepared_statement_destroy | ( | kuzu_prepared_statement * | prepared_statement | ) |
Destroys the prepared statement instance and frees the allocated memory.
prepared_statement | The prepared statement instance to destroy. |
KUZU_C_API char * kuzu_prepared_statement_get_error_message | ( | kuzu_prepared_statement * | prepared_statement | ) |
prepared_statement | The prepared statement instance. |
KUZU_C_API bool kuzu_prepared_statement_is_success | ( | kuzu_prepared_statement * | prepared_statement | ) |
KUZU_C_API void kuzu_query_result_destroy | ( | kuzu_query_result * | query_result | ) |
Destroys the given query result instance.
query_result | The query result instance to destroy. |
KUZU_C_API kuzu_state kuzu_query_result_get_arrow_schema | ( | kuzu_query_result * | query_result, |
struct ArrowSchema * | out_schema ) |
Returns the query result's schema as ArrowSchema.
query_result | The query result instance to return. | |
[out] | out_schema | The output parameter that will hold the datatypes of the columns as an arrow schema. |
It is the caller's responsibility to call the release function to release the underlying data
KUZU_C_API kuzu_state kuzu_query_result_get_column_data_type | ( | kuzu_query_result * | query_result, |
uint64_t | index, | ||
kuzu_logical_type * | out_column_data_type ) |
Returns the data type of the column at the given index.
query_result | The query result instance to return. | |
index | The index of the column to return data type. | |
[out] | out_column_data_type | The output parameter that will hold the column data type. |
KUZU_C_API kuzu_state kuzu_query_result_get_column_name | ( | kuzu_query_result * | query_result, |
uint64_t | index, | ||
char ** | out_column_name ) |
Returns the column name at the given index.
query_result | The query result instance to return. | |
index | The index of the column to return name. | |
[out] | out_column_name | The output parameter that will hold the column name. |
KUZU_C_API char * kuzu_query_result_get_error_message | ( | kuzu_query_result * | query_result | ) |
Returns the error message if the query is failed.
query_result | The query result instance to check and return error message. |
KUZU_C_API kuzu_state kuzu_query_result_get_next | ( | kuzu_query_result * | query_result, |
kuzu_flat_tuple * | out_flat_tuple ) |
Returns the next tuple in the query result. Throws an exception if there is no more tuple.
query_result | The query result instance to return. | |
[out] | out_flat_tuple | The output parameter that will hold the next tuple. |
KUZU_C_API kuzu_state kuzu_query_result_get_next_arrow_chunk | ( | kuzu_query_result * | query_result, |
int64_t | chunk_size, | ||
struct ArrowArray * | out_arrow_array ) |
Returns the next chunk of the query result as ArrowArray.
query_result | The query result instance to return. | |
chunk_size | The number of tuples to return in the chunk. | |
[out] | out_arrow_array | The output parameter that will hold the arrow array representation of the query result. The arrow array internally stores an arrow struct with fields for each of the columns. |
It is the caller's responsibility to call the release function to release the underlying data
KUZU_C_API kuzu_state kuzu_query_result_get_next_query_result | ( | kuzu_query_result * | query_result, |
kuzu_query_result * | out_next_query_result ) |
Returns the next query result. Use this function to loop multiple query statements' results.
query_result | The query result instance to return. | |
[out] | out_next_query_result | The output parameter that will hold the next query result. |
KUZU_C_API uint64_t kuzu_query_result_get_num_columns | ( | kuzu_query_result * | query_result | ) |
Returns the number of columns in the query result.
query_result | The query result instance to return. |
KUZU_C_API uint64_t kuzu_query_result_get_num_tuples | ( | kuzu_query_result * | query_result | ) |
Returns the number of tuples in the query result.
query_result | The query result instance to return. |
KUZU_C_API kuzu_state kuzu_query_result_get_query_summary | ( | kuzu_query_result * | query_result, |
kuzu_query_summary * | out_query_summary ) |
Returns the query summary of the query result.
query_result | The query result instance to return. | |
[out] | out_query_summary | The output parameter that will hold the query summary. |
KUZU_C_API bool kuzu_query_result_has_next | ( | kuzu_query_result * | query_result | ) |
Returns true if we have not consumed all tuples in the query result, false otherwise.
query_result | The query result instance to check. |
KUZU_C_API bool kuzu_query_result_has_next_query_result | ( | kuzu_query_result * | query_result | ) |
Returns true if we have not consumed all query results, false otherwise. Use this function for loop results of multiple query statements.
query_result | The query result instance to check. |
KUZU_C_API bool kuzu_query_result_is_success | ( | kuzu_query_result * | query_result | ) |
Returns true if the query is executed successful, false otherwise.
query_result | The query result instance to check. |
KUZU_C_API void kuzu_query_result_reset_iterator | ( | kuzu_query_result * | query_result | ) |
Resets the iterator of the query result to the beginning of the query result.
query_result | The query result instance to reset iterator. |
KUZU_C_API char * kuzu_query_result_to_string | ( | kuzu_query_result * | query_result | ) |
Returns the query result as a string.
query_result | The query result instance to return. |
KUZU_C_API void kuzu_query_summary_destroy | ( | kuzu_query_summary * | query_summary | ) |
Destroys the given query summary.
query_summary | The query summary to destroy. |
KUZU_C_API double kuzu_query_summary_get_compiling_time | ( | kuzu_query_summary * | query_summary | ) |
Returns the compilation time of the given query summary in milliseconds.
query_summary | The query summary to get compilation time. |
KUZU_C_API double kuzu_query_summary_get_execution_time | ( | kuzu_query_summary * | query_summary | ) |
Returns the execution time of the given query summary in milliseconds.
query_summary | The query summary to get execution time. |
KUZU_C_API kuzu_state kuzu_rel_val_get_dst_id_val | ( | kuzu_value * | rel_val, |
kuzu_value * | out_value ) |
Returns the internal id value of the destination node of the given rel value as a kuzu value.
rel_val | The rel value to return. | |
[out] | out_value | The output parameter that will hold the internal id value. |
KUZU_C_API kuzu_state kuzu_rel_val_get_label_val | ( | kuzu_value * | rel_val, |
kuzu_value * | out_value ) |
Returns the label value of the given rel value.
rel_val | The rel value to return. | |
[out] | out_value | The output parameter that will hold the label value. |
KUZU_C_API kuzu_state kuzu_rel_val_get_property_name_at | ( | kuzu_value * | rel_val, |
uint64_t | index, | ||
char ** | out_result ) |
Returns the property name of the given rel value at the given index.
rel_val | The rel value to return. | |
index | The index of the property. | |
[out] | out_result | The output parameter that will hold the property name at index. |
KUZU_C_API kuzu_state kuzu_rel_val_get_property_size | ( | kuzu_value * | rel_val, |
uint64_t * | out_value ) |
Returns the number of properties of the given rel value.
rel_val | The rel value to return. | |
[out] | out_value | The output parameter that will hold the number of properties. |
KUZU_C_API kuzu_state kuzu_rel_val_get_property_value_at | ( | kuzu_value * | rel_val, |
uint64_t | index, | ||
kuzu_value * | out_value ) |
Returns the property of the given rel value at the given index as kuzu value.
rel_val | The rel value to return. | |
index | The index of the property. | |
[out] | out_value | The output parameter that will hold the property value at index. |
KUZU_C_API kuzu_state kuzu_rel_val_get_src_id_val | ( | kuzu_value * | rel_val, |
kuzu_value * | out_value ) |
Returns the internal id value of the source node of the given rel value as a kuzu value.
rel_val | The rel value to return. | |
[out] | out_value | The output parameter that will hold the internal id value. |
KUZU_C_API kuzu_state kuzu_rel_val_to_string | ( | kuzu_value * | rel_val, |
char ** | out_result ) |
Converts the given rel value to string.
rel_val | The rel value to convert. | |
[out] | out_result | The output parameter that will hold the rel value as a string. |
KUZU_C_API kuzu_state kuzu_timestamp_from_tm | ( | struct tm | tm, |
kuzu_timestamp_t * | out_result ) |
Convert timestamp_ns to corresponding string.
timestamp | The timestamp_ns value to convert. | |
[out] | out_result | The output parameter that will hold the string value. |
KUZU_C_API kuzu_state kuzu_timestamp_ms_from_tm | ( | struct tm | tm, |
kuzu_timestamp_ms_t * | out_result ) |
Convert tm struct to timestamp_ms value.
tm | The tm struct to convert. | |
[out] | out_result | The output parameter that will hold the timestamp_ms value. |
KUZU_C_API kuzu_state kuzu_timestamp_ms_to_tm | ( | kuzu_timestamp_ms_t | timestamp, |
struct tm * | out_result ) |
Convert timestamp_ms to corresponding tm struct.
timestamp | The timestamp_ms value to convert. | |
[out] | out_result | The output parameter that will hold the tm struct. |
KUZU_C_API kuzu_state kuzu_timestamp_ns_from_tm | ( | struct tm | tm, |
kuzu_timestamp_ns_t * | out_result ) |
Convert tm struct to timestamp_ns value.
tm | The tm struct to convert. | |
[out] | out_result | The output parameter that will hold the timestamp_ns value. |
KUZU_C_API kuzu_state kuzu_timestamp_ns_to_tm | ( | kuzu_timestamp_ns_t | timestamp, |
struct tm * | out_result ) |
Convert timestamp_ns to corresponding tm struct.
timestamp | The timestamp_ns value to convert. | |
[out] | out_result | The output parameter that will hold the tm struct. |
KUZU_C_API kuzu_state kuzu_timestamp_sec_from_tm | ( | struct tm | tm, |
kuzu_timestamp_sec_t * | out_result ) |
Convert tm struct to timestamp_sec value.
tm | The tm struct to convert. | |
[out] | out_result | The output parameter that will hold the timestamp_sec value. |
KUZU_C_API kuzu_state kuzu_timestamp_sec_to_tm | ( | kuzu_timestamp_sec_t | timestamp, |
struct tm * | out_result ) |
Convert timestamp_sec to corresponding tm struct.
timestamp | The timestamp_sec value to convert. | |
[out] | out_result | The output parameter that will hold the tm struct. |
KUZU_C_API kuzu_state kuzu_timestamp_to_tm | ( | kuzu_timestamp_t | timestamp, |
struct tm * | out_result ) |
Convert timestamp to corresponding tm struct.
timestamp | The timestamp value to convert. | |
[out] | out_result | The output parameter that will hold the tm struct. |
KUZU_C_API kuzu_state kuzu_timestamp_tz_from_tm | ( | struct tm | tm, |
kuzu_timestamp_tz_t * | out_result ) |
Convert tm struct to timestamp_tz value.
tm | The tm struct to convert. | |
[out] | out_result | The output parameter that will hold the timestamp_tz value. |
KUZU_C_API kuzu_state kuzu_timestamp_tz_to_tm | ( | kuzu_timestamp_tz_t | timestamp, |
struct tm * | out_result ) |
Convert timestamp_tz to corresponding tm struct.
timestamp | The timestamp_tz value to convert. | |
[out] | out_result | The output parameter that will hold the tm struct. |
KUZU_C_API kuzu_value * kuzu_value_clone | ( | kuzu_value * | value | ) |
Creates a new value based on the given value. Caller is responsible for destroying the returned value.
value | The value to create from. |
KUZU_C_API void kuzu_value_copy | ( | kuzu_value * | value, |
kuzu_value * | other ) |
Copies the other value to the value.
value | The value to copy to. |
other | The value to copy from. |
KUZU_C_API kuzu_value * kuzu_value_create_bool | ( | bool | val_ | ) |
Creates a value with boolean type and the given bool value. Caller is responsible for destroying the returned value.
val_ | The bool value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_date | ( | kuzu_date_t | val_ | ) |
Creates a value with date type and the given date value. Caller is responsible for destroying the returned value.
val_ | The date value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_default | ( | kuzu_logical_type * | data_type | ) |
Creates a value of the given data type with default non-NULL value. Caller is responsible for destroying the returned value.
data_type | The data type of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_double | ( | double | val_ | ) |
Creates a value with double type and the given double value. Caller is responsible for destroying the returned value.
val_ | The double value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_float | ( | float | val_ | ) |
Creates a value with float type and the given float value. Caller is responsible for destroying the returned value.
val_ | The float value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_int128 | ( | kuzu_int128_t | val_ | ) |
Creates a value with int128 type and the given int128 value. Caller is responsible for destroying the returned value.
val_ | The int128 value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_int16 | ( | int16_t | val_ | ) |
Creates a value with int16 type and the given int16 value. Caller is responsible for destroying the returned value.
val_ | The int16 value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_int32 | ( | int32_t | val_ | ) |
Creates a value with int32 type and the given int32 value. Caller is responsible for destroying the returned value.
val_ | The int32 value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_int64 | ( | int64_t | val_ | ) |
Creates a value with int64 type and the given int64 value. Caller is responsible for destroying the returned value.
val_ | The int64 value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_int8 | ( | int8_t | val_ | ) |
Creates a value with int8 type and the given int8 value. Caller is responsible for destroying the returned value.
val_ | The int8 value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_internal_id | ( | kuzu_internal_id_t | val_ | ) |
Creates a value with internal_id type and the given internal_id value. Caller is responsible for destroying the returned value.
val_ | The internal_id value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_interval | ( | kuzu_interval_t | val_ | ) |
Creates a value with interval type and the given interval value. Caller is responsible for destroying the returned value.
val_ | The interval value of the value to create. |
KUZU_C_API kuzu_state kuzu_value_create_list | ( | uint64_t | num_elements, |
kuzu_value ** | elements, | ||
kuzu_value ** | out_value ) |
Creates a list value with the given number of elements and the given elements. The caller needs to make sure that all elements have the same type. The elements are copied into the list value, so destroying the elements after creating the list value is safe. Caller is responsible for destroying the returned value.
num_elements | The number of elements in the list. | |
elements | The elements of the list. | |
[out] | out_value | The output parameter that will hold a pointer to the created list value. |
KUZU_C_API kuzu_state kuzu_value_create_map | ( | uint64_t | num_fields, |
kuzu_value ** | keys, | ||
kuzu_value ** | values, | ||
kuzu_value ** | out_value ) |
Creates a map value with the given number of fields and the given keys and values. The caller needs to make sure that all keys are unique, and all keys and values have the same type. The keys and values are copied into the map value, so destroying the keys and values after creating the map value is safe. Caller is responsible for destroying the returned value.
num_fields | The number of fields in the map. | |
keys | The keys of the map. | |
values | The values of the map. | |
[out] | out_value | The output parameter that will hold a pointer to the created map value. |
KUZU_C_API kuzu_value * kuzu_value_create_null | ( | ) |
Creates a NULL value of ANY type. Caller is responsible for destroying the returned value.
KUZU_C_API kuzu_value * kuzu_value_create_null_with_data_type | ( | kuzu_logical_type * | data_type | ) |
Creates a value of the given data type. Caller is responsible for destroying the returned value.
data_type | The data type of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_string | ( | const char * | val_ | ) |
Creates a value with string type and the given string value. Caller is responsible for destroying the returned value.
val_ | The string value of the value to create. |
KUZU_C_API kuzu_state kuzu_value_create_struct | ( | uint64_t | num_fields, |
const char ** | field_names, | ||
kuzu_value ** | field_values, | ||
kuzu_value ** | out_value ) |
Creates a struct value with the given number of fields and the given field names and values. The caller needs to make sure that all field names are unique. The field names and values are copied into the struct value, so destroying the field names and values after creating the struct value is safe. Caller is responsible for destroying the returned value.
num_fields | The number of fields in the struct. | |
field_names | The field names of the struct. | |
field_values | The field values of the struct. | |
[out] | out_value | The output parameter that will hold a pointer to the created struct value. |
KUZU_C_API kuzu_value * kuzu_value_create_timestamp | ( | kuzu_timestamp_t | val_ | ) |
Creates a value with timestamp type and the given timestamp value. Caller is responsible for destroying the returned value.
val_ | The timestamp value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_timestamp_ms | ( | kuzu_timestamp_ms_t | val_ | ) |
Creates a value with timestamp_ms type and the given timestamp value. Caller is responsible for destroying the returned value.
val_ | The timestamp_ms value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_timestamp_ns | ( | kuzu_timestamp_ns_t | val_ | ) |
Creates a value with timestamp_ns type and the given timestamp value. Caller is responsible for destroying the returned value.
val_ | The timestamp_ns value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_timestamp_sec | ( | kuzu_timestamp_sec_t | val_ | ) |
Creates a value with timestamp_sec type and the given timestamp value. Caller is responsible for destroying the returned value.
val_ | The timestamp_sec value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_timestamp_tz | ( | kuzu_timestamp_tz_t | val_ | ) |
Creates a value with timestamp_tz type and the given timestamp value. Caller is responsible for destroying the returned value.
val_ | The timestamp_tz value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_uint16 | ( | uint16_t | val_ | ) |
Creates a value with uint16 type and the given uint16 value. Caller is responsible for destroying the returned value.
val_ | The uint16 value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_uint32 | ( | uint32_t | val_ | ) |
Creates a value with uint32 type and the given uint32 value. Caller is responsible for destroying the returned value.
val_ | The uint32 value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_uint64 | ( | uint64_t | val_ | ) |
Creates a value with uint64 type and the given uint64 value. Caller is responsible for destroying the returned value.
val_ | The uint64 value of the value to create. |
KUZU_C_API kuzu_value * kuzu_value_create_uint8 | ( | uint8_t | val_ | ) |
Creates a value with uint8 type and the given uint8 value. Caller is responsible for destroying the returned value.
val_ | The uint8 value of the value to create. |
KUZU_C_API void kuzu_value_destroy | ( | kuzu_value * | value | ) |
Destroys the value.
value | The value to destroy. |
KUZU_C_API kuzu_state kuzu_value_get_blob | ( | kuzu_value * | value, |
uint8_t ** | out_result ) |
Returns the blob value of the given value. The returned buffer is null-terminated similar to a string. The value must be of type BLOB.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the blob value. |
KUZU_C_API kuzu_state kuzu_value_get_bool | ( | kuzu_value * | value, |
bool * | out_result ) |
Returns the boolean value of the given value. The value must be of type BOOL.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the boolean value. |
KUZU_C_API void kuzu_value_get_data_type | ( | kuzu_value * | value, |
kuzu_logical_type * | out_type ) |
Returns internal type of the given value.
value | The value to return. | |
[out] | out_type | The output parameter that will hold the internal type of the value. |
KUZU_C_API kuzu_state kuzu_value_get_date | ( | kuzu_value * | value, |
kuzu_date_t * | out_result ) |
Returns the date value of the given value. The value must be of type DATE.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the date value. |
KUZU_C_API kuzu_state kuzu_value_get_decimal_as_string | ( | kuzu_value * | value, |
char ** | out_result ) |
Returns the decimal value of the given value as a string. The value must be of type DECIMAL.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the decimal value. |
KUZU_C_API kuzu_state kuzu_value_get_double | ( | kuzu_value * | value, |
double * | out_result ) |
Returns the double value of the given value. The value must be of type DOUBLE.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the double value. |
KUZU_C_API kuzu_state kuzu_value_get_float | ( | kuzu_value * | value, |
float * | out_result ) |
Returns the float value of the given value. The value must be of type FLOAT.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the float value. |
KUZU_C_API kuzu_state kuzu_value_get_int128 | ( | kuzu_value * | value, |
kuzu_int128_t * | out_result ) |
Returns the int128 value of the given value. The value must be of type INT128.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the int128 value. |
KUZU_C_API kuzu_state kuzu_value_get_int16 | ( | kuzu_value * | value, |
int16_t * | out_result ) |
Returns the int16 value of the given value. The value must be of type INT16.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the int16 value. |
KUZU_C_API kuzu_state kuzu_value_get_int32 | ( | kuzu_value * | value, |
int32_t * | out_result ) |
Returns the int32 value of the given value. The value must be of type INT32.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the int32 value. |
KUZU_C_API kuzu_state kuzu_value_get_int64 | ( | kuzu_value * | value, |
int64_t * | out_result ) |
Returns the int64 value of the given value. The value must be of type INT64 or SERIAL.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the int64 value. |
KUZU_C_API kuzu_state kuzu_value_get_int8 | ( | kuzu_value * | value, |
int8_t * | out_result ) |
Returns the int8 value of the given value. The value must be of type INT8.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the int8 value. |
KUZU_C_API kuzu_state kuzu_value_get_internal_id | ( | kuzu_value * | value, |
kuzu_internal_id_t * | out_result ) |
Returns the internal id value of the given value. The value must be of type INTERNAL_ID.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the internal id value. |
KUZU_C_API kuzu_state kuzu_value_get_interval | ( | kuzu_value * | value, |
kuzu_interval_t * | out_result ) |
Returns the interval value of the given value. The value must be of type INTERVAL.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the interval value. |
KUZU_C_API kuzu_state kuzu_value_get_list_element | ( | kuzu_value * | value, |
uint64_t | index, | ||
kuzu_value * | out_value ) |
Returns the element at index of the given value. The value must be of type LIST.
value | The LIST value to return. | |
index | The index of the element to return. | |
[out] | out_value | The output parameter that will hold the element at index. |
KUZU_C_API kuzu_state kuzu_value_get_list_size | ( | kuzu_value * | value, |
uint64_t * | out_result ) |
Returns the number of elements per list of the given value. The value must be of type ARRAY.
value | The ARRAY value to get list size. | |
[out] | out_result | The output parameter that will hold the number of elements per list. |
KUZU_C_API kuzu_state kuzu_value_get_map_key | ( | kuzu_value * | value, |
uint64_t | index, | ||
kuzu_value * | out_key ) |
Returns the key at index of the given map value. The value must be of physical type MAP.
value | The MAP value to get key. | |
index | The index of the field name to return. | |
[out] | out_key | The output parameter that will hold the key at index. |
KUZU_C_API kuzu_state kuzu_value_get_map_size | ( | kuzu_value * | value, |
uint64_t * | out_result ) |
Returns the size of the given map value. The value must be of type MAP.
value | The MAP value to get size. | |
[out] | out_result | The output parameter that will hold the size of the map. |
KUZU_C_API kuzu_state kuzu_value_get_map_value | ( | kuzu_value * | value, |
uint64_t | index, | ||
kuzu_value * | out_value ) |
Returns the field value at index of the given map value. The value must be of physical type MAP.
value | The MAP value to get field value. | |
index | The index of the field value to return. | |
[out] | out_value | The output parameter that will hold the field value at index. |
KUZU_C_API kuzu_state kuzu_value_get_recursive_rel_node_list | ( | kuzu_value * | value, |
kuzu_value * | out_value ) |
Returns the list of nodes for recursive rel value. The value must be of type RECURSIVE_REL.
value | The RECURSIVE_REL value to return. | |
[out] | out_value | The output parameter that will hold the list of nodes. |
KUZU_C_API kuzu_state kuzu_value_get_recursive_rel_rel_list | ( | kuzu_value * | value, |
kuzu_value * | out_value ) |
Returns the list of rels for recursive rel value. The value must be of type RECURSIVE_REL.
value | The RECURSIVE_REL value to return. | |
[out] | out_value | The output parameter that will hold the list of rels. |
KUZU_C_API kuzu_state kuzu_value_get_string | ( | kuzu_value * | value, |
char ** | out_result ) |
Returns the string value of the given value. The value must be of type STRING.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the string value. |
KUZU_C_API kuzu_state kuzu_value_get_struct_field_name | ( | kuzu_value * | value, |
uint64_t | index, | ||
char ** | out_result ) |
Returns the field name at index of the given struct value. The value must be of physical type STRUCT (STRUCT, NODE, REL, RECURSIVE_REL, UNION).
value | The STRUCT value to get field name. | |
index | The index of the field name to return. | |
[out] | out_result | The output parameter that will hold the field name at index. |
KUZU_C_API kuzu_state kuzu_value_get_struct_field_value | ( | kuzu_value * | value, |
uint64_t | index, | ||
kuzu_value * | out_value ) |
Returns the field value at index of the given struct value. The value must be of physical type STRUCT (STRUCT, NODE, REL, RECURSIVE_REL, UNION).
value | The STRUCT value to get field value. | |
index | The index of the field value to return. | |
[out] | out_value | The output parameter that will hold the field value at index. |
KUZU_C_API kuzu_state kuzu_value_get_struct_num_fields | ( | kuzu_value * | value, |
uint64_t * | out_result ) |
Returns the number of fields of the given struct value. The value must be of type STRUCT.
value | The STRUCT value to get number of fields. | |
[out] | out_result | The output parameter that will hold the number of fields. |
KUZU_C_API kuzu_state kuzu_value_get_timestamp | ( | kuzu_value * | value, |
kuzu_timestamp_t * | out_result ) |
Returns the timestamp value of the given value. The value must be of type TIMESTAMP.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the timestamp value. |
KUZU_C_API kuzu_state kuzu_value_get_timestamp_ms | ( | kuzu_value * | value, |
kuzu_timestamp_ms_t * | out_result ) |
Returns the timestamp_ms value of the given value. The value must be of type TIMESTAMP_MS.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the timestamp_ms value. |
KUZU_C_API kuzu_state kuzu_value_get_timestamp_ns | ( | kuzu_value * | value, |
kuzu_timestamp_ns_t * | out_result ) |
Returns the timestamp_ns value of the given value. The value must be of type TIMESTAMP_NS.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the timestamp_ns value. |
KUZU_C_API kuzu_state kuzu_value_get_timestamp_sec | ( | kuzu_value * | value, |
kuzu_timestamp_sec_t * | out_result ) |
Returns the timestamp_sec value of the given value. The value must be of type TIMESTAMP_SEC.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the timestamp_sec value. |
KUZU_C_API kuzu_state kuzu_value_get_timestamp_tz | ( | kuzu_value * | value, |
kuzu_timestamp_tz_t * | out_result ) |
Returns the timestamp_tz value of the given value. The value must be of type TIMESTAMP_TZ.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the timestamp_tz value. |
KUZU_C_API kuzu_state kuzu_value_get_uint16 | ( | kuzu_value * | value, |
uint16_t * | out_result ) |
Returns the uint16 value of the given value. The value must be of type UINT16.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the uint16 value. |
KUZU_C_API kuzu_state kuzu_value_get_uint32 | ( | kuzu_value * | value, |
uint32_t * | out_result ) |
Returns the uint32 value of the given value. The value must be of type UINT32.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the uint32 value. |
KUZU_C_API kuzu_state kuzu_value_get_uint64 | ( | kuzu_value * | value, |
uint64_t * | out_result ) |
Returns the uint64 value of the given value. The value must be of type UINT64.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the uint64 value. |
KUZU_C_API kuzu_state kuzu_value_get_uint8 | ( | kuzu_value * | value, |
uint8_t * | out_result ) |
Returns the uint8 value of the given value. The value must be of type UINT8.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the uint8 value. |
KUZU_C_API kuzu_state kuzu_value_get_uuid | ( | kuzu_value * | value, |
char ** | out_result ) |
Returns the uuid value of the given value. to a string. The value must be of type UUID.
value | The value to return. | |
[out] | out_result | The output parameter that will hold the uuid value. |
KUZU_C_API bool kuzu_value_is_null | ( | kuzu_value * | value | ) |
Returns true if the given value is NULL, false otherwise.
value | The value instance to check. |
KUZU_C_API void kuzu_value_set_null | ( | kuzu_value * | value, |
bool | is_null ) |
Sets the given value to NULL or not.
value | The value instance to set. |
is_null | True if sets the value to NULL, false otherwise. |
KUZU_C_API char * kuzu_value_to_string | ( | kuzu_value * | value | ) |
Converts the given value to string.
value | The value to convert. |