#include "localcli.h"
#include "ttree.h"
#include "rtree.h"
#include "hashtab.h"
#include "symtab.h"
#include <ctype.h>
Defines | |
| #define | INSIDE_FASTDB |
| #define | MAX_QUERY_IDENTIFIER_LENGTH 256 |
Functions | |
| int | cli_open (char const *server_url, int max_connect_attempts, int reconnect_timeout_sec) |
| int | cli_create (char const *databaseName, char const *filePath, unsigned transactionCommitDelay, int openAttr, size_t initDatabaseSize, size_t extensionQuantum, size_t initIndexSize, size_t fileSizeLimit) |
| int | cli_create_replication_node (int nodeId, int nServers, char *nodeNames[], char const *databaseName, char const *filePath, int openAttr, size_t initDatabaseSize, size_t extensionQuantum, size_t initIndexSize, size_t fileSizeLimit) |
| int | cli_close (int session) |
| int | cli_statement (int session, char const *sql) |
| int | cli_parameter (int statement, char const *param_name, int var_type, void *var_ptr) |
| int | cli_column (int statement, char const *column_name, int var_type, int *var_len, void *var_ptr) |
| int | cli_array_column (int statement, char const *column_name, int var_type, void *var_ptr, cli_column_set set, cli_column_get get) |
| int | cli_array_column_ex (int statement, char const *column_name, int var_type, void *var_ptr, cli_column_set_ex set, cli_column_get_ex get, void *user_data) |
| int | cli_fetch (int statement, int for_update) |
| int | cli_insert (int statement, cli_oid_t *oid) |
| int | cli_update (int statement) |
| int | cli_freeze (int statement) |
| int | cli_unfreeze (int statement) |
| int | cli_get_first (int statement) |
| int | cli_get_last (int statement) |
| int | cli_remove_current (int statement) |
| int | cli_get_next (int statement) |
| int | cli_get_prev (int statement) |
| int | cli_skip (int statement, int n) |
| int | cli_seek (int statement, cli_oid_t oid) |
| cli_oid_t | cli_get_oid (int statement) |
| int | cli_close_cursor (int statement) |
| int | cli_free (int statement) |
| int | cli_commit (int session) |
| int | cli_precommit (int session) |
| int | cli_abort (int session) |
| int | cli_remove (int statement) |
| int | cli_describe (int session, char const *table, cli_field_descriptor **fields) |
| int | cli_describe_layout (int session, char const *table, cli_field_layout **fields, int *rec_size) |
| int | cli_show_tables (int session, cli_table_descriptor **tables) |
| int | cli_create_table (int session, char const *tableName, int nColumns, cli_field_descriptor *columns) |
| int | cli_alter_table (int session, char const *tableName, int nColumns, cli_field_descriptor *columns) |
| int | cli_drop_table (int session, char const *tableName) |
| int | cli_alter_index (int session, char const *tableName, char const *fieldName, int newFlags) |
| cli_error_handler | cli_set_error_handler (int session, cli_error_handler new_handler, void *context) |
| int | cli_attach (int session) |
| int | cli_detach (int session, int detach_mode) |
| void | cli_free_memory (int, void *ptr) |
| int | cli_get_database_state (int session, cli_database_monitor *monitor) |
| void | cli_set_trace_function (cli_trace_function_t func) |
| int | cli_prepare_query (int session, char const *query) |
| int | cli_execute_query (int statement, int for_update, void *record_struct,...) |
| cli_execute_query Execute query previously prepared by cli_prepare_query with varying list of parameters Parameters: statement - statement descriptor returned by cli_prepare_query for_update - not zero if fetched rows will be updated record_struct - structure to receive selected record fields | |
| int | cli_execute_query_ex (int statement, int for_update, void *record_struct, int n_params, int *param_types, void **param_values) |
| cli_execute_query_ex Execute query previously prepared by cli_prepare_query with parameters passed as array Parameters: statement - statement descriptor returned by cli_prepare_query for_update - not zero if fetched rows will be updated record_struct - structure to receive selected record fields n_params - number of parameters param_types - types of parameters (cli_var_type) param_values - array of pointers to parameter values Returns: >= 0 - success, for select statements number of fetched rows is returned < 0 - error code as described in cli_result_code enum | |
| int | cli_insert_struct (int session, char const *table_name, void *record_struct, cli_oid_t *oid) |
| cli_insert_struct Insert new record represented as C structure Parameters: session - session descriptor returned by cli_open table_name - name of the destination table record_struct - structure specifying value of record fields oid - pointer to the location to receive OID of created record (may be NULL) Returns: result code as described in cli_result_code enum | |
| int | cli_get_field_size (cli_field_descriptor *fields, int field_no) |
| int | cli_get_field_offset (cli_field_descriptor *fields, int field_no) |
| cli_transaction_context_t | cli_create_transaction_context () |
| void | cli_remove_transaction_context (cli_transaction_context_t ctx) |
| int | cli_join_transaction (int stmt, cli_transaction_context_t ctx) |
| #define INSIDE_FASTDB |
| #define MAX_QUERY_IDENTIFIER_LENGTH 256 |
| int cli_open | ( | char const * | server_url, | |
| int | max_connect_attempts, | |||
| int | reconnect_timeout_sec | |||
| ) |
| int cli_create | ( | char const * | databaseName, | |
| char const * | filePath, | |||
| unsigned | transactionCommitDelay, | |||
| int | openAttr, | |||
| size_t | initDatabaseSize, | |||
| size_t | extensionQuantum, | |||
| size_t | initIndexSize, | |||
| size_t | fileSizeLimit | |||
| ) |
| int cli_create_replication_node | ( | int | nodeId, | |
| int | nServers, | |||
| char * | nodeNames[], | |||
| char const * | databaseName, | |||
| char const * | filePath, | |||
| int | openAttr, | |||
| size_t | initDatabaseSize, | |||
| size_t | extensionQuantum, | |||
| size_t | initIndexSize, | |||
| size_t | fileSizeLimit | |||
| ) |
| int cli_close | ( | int | session | ) |
| int cli_statement | ( | int | session, | |
| char const * | sql | |||
| ) |
| int cli_parameter | ( | int | statement, | |
| char const * | param_name, | |||
| int | var_type, | |||
| void * | var_ptr | |||
| ) |
| int cli_column | ( | int | statement, | |
| char const * | column_name, | |||
| int | var_type, | |||
| int * | var_len, | |||
| void * | var_ptr | |||
| ) |
| int cli_array_column | ( | int | statement, | |
| char const * | column_name, | |||
| int | var_type, | |||
| void * | var_ptr, | |||
| cli_column_set | set, | |||
| cli_column_get | get | |||
| ) |
| int cli_array_column_ex | ( | int | statement, | |
| char const * | column_name, | |||
| int | var_type, | |||
| void * | var_ptr, | |||
| cli_column_set_ex | set, | |||
| cli_column_get_ex | get, | |||
| void * | user_data | |||
| ) |
| int cli_fetch | ( | int | statement, | |
| int | for_update | |||
| ) |
| int cli_insert | ( | int | statement, | |
| cli_oid_t * | oid | |||
| ) |
| int cli_update | ( | int | statement | ) |
| int cli_freeze | ( | int | statement | ) |
| int cli_unfreeze | ( | int | statement | ) |
| int cli_get_first | ( | int | statement | ) |
| int cli_get_last | ( | int | statement | ) |
| int cli_remove_current | ( | int | statement | ) |
| int cli_get_next | ( | int | statement | ) |
| int cli_get_prev | ( | int | statement | ) |
| int cli_skip | ( | int | statement, | |
| int | n | |||
| ) |
| int cli_seek | ( | int | statement, | |
| cli_oid_t | oid | |||
| ) |
| cli_oid_t cli_get_oid | ( | int | statement | ) |
| int cli_close_cursor | ( | int | statement | ) |
| int cli_free | ( | int | statement | ) |
| int cli_commit | ( | int | session | ) |
| int cli_precommit | ( | int | session | ) |
| int cli_abort | ( | int | session | ) |
| int cli_remove | ( | int | statement | ) |
| int cli_describe | ( | int | session, | |
| char const * | table, | |||
| cli_field_descriptor ** | fields | |||
| ) |
| int cli_describe_layout | ( | int | session, | |
| char const * | table, | |||
| cli_field_layout ** | fields, | |||
| int * | rec_size | |||
| ) |
| int cli_show_tables | ( | int | session, | |
| cli_table_descriptor ** | tables | |||
| ) |
| int cli_create_table | ( | int | session, | |
| char const * | tableName, | |||
| int | nColumns, | |||
| cli_field_descriptor * | columns | |||
| ) |
| int cli_alter_table | ( | int | session, | |
| char const * | tableName, | |||
| int | nColumns, | |||
| cli_field_descriptor * | columns | |||
| ) |
| int cli_drop_table | ( | int | session, | |
| char const * | tableName | |||
| ) |
| int cli_alter_index | ( | int | session, | |
| char const * | tableName, | |||
| char const * | fieldName, | |||
| int | newFlags | |||
| ) |
| cli_error_handler cli_set_error_handler | ( | int | session, | |
| cli_error_handler | new_handler, | |||
| void * | context | |||
| ) |
| int cli_attach | ( | int | session | ) |
| int cli_detach | ( | int | session, | |
| int | detach_mode | |||
| ) |
| void cli_free_memory | ( | int | , | |
| void * | ptr | |||
| ) |
| int cli_get_database_state | ( | int | session, | |
| cli_database_monitor * | monitor | |||
| ) |
| void cli_set_trace_function | ( | cli_trace_function_t | func | ) |
| int cli_prepare_query | ( | int | session, | |
| char const * | query | |||
| ) |
| int cli_execute_query | ( | int | statement, | |
| int | for_update, | |||
| void * | record_struct, | |||
| ... | ||||
| ) |
cli_execute_query Execute query previously prepared by cli_prepare_query with varying list of parameters Parameters: statement - statement descriptor returned by cli_prepare_query for_update - not zero if fetched rows will be updated record_struct - structure to receive selected record fields
.. - varying list of query parameters Returns: >= 0 - success, for select statements number of fetched rows is returned < 0 - error code as described in cli_result_code enum
| int cli_execute_query_ex | ( | int | statement, | |
| int | for_update, | |||
| void * | record_struct, | |||
| int | n_params, | |||
| int * | param_types, | |||
| void ** | param_values | |||
| ) |
cli_execute_query_ex Execute query previously prepared by cli_prepare_query with parameters passed as array Parameters: statement - statement descriptor returned by cli_prepare_query for_update - not zero if fetched rows will be updated record_struct - structure to receive selected record fields n_params - number of parameters param_types - types of parameters (cli_var_type) param_values - array of pointers to parameter values Returns: >= 0 - success, for select statements number of fetched rows is returned < 0 - error code as described in cli_result_code enum
| int cli_insert_struct | ( | int | session, | |
| char const * | table_name, | |||
| void * | record_struct, | |||
| cli_oid_t * | oid | |||
| ) |
cli_insert_struct Insert new record represented as C structure Parameters: session - session descriptor returned by cli_open table_name - name of the destination table record_struct - structure specifying value of record fields oid - pointer to the location to receive OID of created record (may be NULL) Returns: result code as described in cli_result_code enum
| int cli_get_field_size | ( | cli_field_descriptor * | fields, | |
| int | field_no | |||
| ) |
| int cli_get_field_offset | ( | cli_field_descriptor * | fields, | |
| int | field_no | |||
| ) |
| cli_transaction_context_t cli_create_transaction_context | ( | ) |
| void cli_remove_transaction_context | ( | cli_transaction_context_t | ctx | ) |
| int cli_join_transaction | ( | int | stmt, | |
| cli_transaction_context_t | ctx | |||
| ) |