MCPcopy Create free account

hub / github.com/KaisenAmin/c_std / functions

Functions2,651 in github.com/KaisenAmin/c_std

Functionpostgres_escape_identifier
* @brief SQL-escape an identifier (table / column name) using libpq's * connection-aware quoting. * * Returns a newly-allocated, double-quot
database/postgres.c:2650
Functionpostgres_escape_string
* @brief SQL-escape a string literal (value) using libpq's * connection-aware quoting. * * Returns a newly-allocated, single-quoted string s
database/postgres.c:2681
Functionpostgres_execute_non_query
* @brief Executes a non-query command (e.g., INSERT, UPDATE, DELETE) on the PostgreSQL database. * * @param pg Pointer to the Postgres structure re
database/postgres.c:192
Functionpostgres_execute_prepared
* @brief Executes a prepared SQL statement with the given parameters. * * @param pg Pointer to the Postgres structure representing the connection.
database/postgres.c:712
Functionpostgres_flush
* @brief Flushes any queued output data to the PostgreSQL server. * * @param pg Pointer to the Postgres structure representing the connection. * @
database/postgres.c:1597
Functionpostgres_get_affected_rows
* @brief Retrieves the number of rows affected by the last command executed. * * @param pg Pointer to the Postgres structure representing the conne
database/postgres.c:472
Functionpostgres_get_async_result
* @brief Retrieve the result of an asynchronous query when it's ready. * * This function retrieves the result of a previously sent asynchronous quer
database/postgres.c:2477
Functionpostgres_get_column_details
* @brief Retrieves detailed information about the columns in a specified table. * * @param pg Pointer to the Postgres structure representing the co
database/postgres.c:998
Functionpostgres_get_field_name
* @brief Return the column name at index @p col. * * Borrowed pointer owned by the result; do NOT free. NULL on bad * input. */
database/postgres.c:2590
Functionpostgres_get_line
* @brief Reads a newline-terminated line from the PostgreSQL server. * * @param pg Pointer to the Postgres structure representing the connection.
database/postgres.c:1637
Functionpostgres_get_line_async
* @brief Reads a newline-terminated line asynchronously from the PostgreSQL server. * * @param pg Pointer to the Postgres structure representing th
database/postgres.c:1661
Functionpostgres_get_result
* @brief Retrieves the result of the last executed command. * * @param pg Pointer to the Postgres structure representing the connection. * @return
database/postgres.c:1766
Functionpostgres_get_single_value
* @brief Run @p query and return the value at row 0, column 0 as a * newly-allocated string (caller frees). * * The natural shape for scalar
database/postgres.c:2610
Functionpostgres_get_table_columns
* @brief Retrieves the names of all columns in a specified table. * * @param pg Pointer to the Postgres structure representing the connection. * @
database/postgres.c:745
Functionpostgres_get_table_constraints
* @brief Retrieves all constraints on a specified table. * * @param pg Pointer to the Postgres structure representing the connection. * @param tab
database/postgres.c:1168
Functionpostgres_get_table_foreign_keys
* @brief Retrieves the foreign keys of a specified table. * * @param pg Pointer to the Postgres structure representing the connection. * @param ta
database/postgres.c:829
Functionpostgres_get_table_index_count
* @brief Retrieves the number of indexes on a specified table. * * @param pg Pointer to the Postgres structure representing the connection. * @par
database/postgres.c:956
Functionpostgres_get_table_indexes
* @brief Retrieves the indexes of a specified table. * * @param pg Pointer to the Postgres structure representing the connection. * @param tableNa
database/postgres.c:879
Functionpostgres_get_table_primary_keys
* @brief Retrieves the primary keys of a specified table. * * @param pg Pointer to the Postgres structure representing the connection. * @param ta
database/postgres.c:786
Functionpostgres_get_table_row_count
* @brief Retrieves the number of rows in a specified table. * * @param pg Pointer to the Postgres structure representing the connection. * @param
database/postgres.c:553
Functionpostgres_get_table_schema
* @brief Retrieves the schema of a specified table, including column names and data types. * * @param pg Pointer to the Postgres structure represen
database/postgres.c:669
Functionpostgres_get_table_size
* @brief Retrieves the size of a specified table in a human-readable format. * * @param pg Pointer to the Postgres structure representing the conne
database/postgres.c:919
Functionpostgres_get_value
* @brief Retrieves the value of a specific field in a result set. * * @param pgRes Pointer to the PostgresResult structure containing the result se
database/postgres.c:1040
Functionpostgres_get_value_as_double
* @brief Reads a result cell as a double, safely. * * The floating-point counterpart to postgres_get_value_as_int. Returns the cell * parsed as a `
database/postgres.c:1126
Functionpostgres_get_value_as_int
* @brief Reads a result cell as a 64-bit integer, safely. * * The typed, crash-proof companion to postgres_get_value: it returns the cell * parsed
database/postgres.c:1076
Functionpostgres_host_value
* @brief Retrieves the host name or IP address of the PostgreSQL server. * * @param pg Pointer to the Postgres structure representing the connectio
database/postgres.c:1442
Functionpostgres_init
* @brief Initializes the Postgres structure with database connection parameters. * * @param pg Pointer to the Postgres structure to be initialized.
database/postgres.c:60
Functionpostgres_is_busy
* @brief Checks if the PostgreSQL connection is currently busy processing a command. * * @param pg Pointer to the Postgres structure representing t
database/postgres.c:1563
Functionpostgres_is_connected
* @brief Quick "is the connection currently live?" check. * * Inspects the `PGconn` status without sending any traffic. Useful * after a `postgres_
database/postgres.c:2575
Functionpostgres_is_non_blocking
* @brief Checks if the PostgreSQL connection is in non-blocking mode. * * @param pg Pointer to the Postgres structure representing the connection.
database/postgres.c:1580
Functionpostgres_is_null
* @brief Checks if a specific field in the result set is NULL. * * @param pgRes Pointer to the PostgresResult structure containing the result set.
database/postgres.c:1328
Functionpostgres_list_tables
* @brief Lists all tables in the 'public' schema of the connected PostgreSQL database. * * @param pg Pointer to the Postgres structure representing
database/postgres.c:633
Functionpostgres_object_id_status
* @brief Retrieves the object ID of the inserted row, if the last command was an INSERT. * * @param pgRes Pointer to the PostgresResult structure c
database/postgres.c:1478
Functionpostgres_password_value
* @brief Retrieves the password used to connect to the database. * * @param pg Pointer to the Postgres structure representing the connection. * @r
database/postgres.c:1424
Functionpostgres_ping
* @brief Checks if the connection to the PostgreSQL database server is still alive. * * @param pg Pointer to the Postgres structure representing th
database/postgres.c:1840
Functionpostgres_port_value
* @brief Retrieves the port number of the PostgreSQL server. * * @param pg Pointer to the Postgres structure representing the connection. * @retur
database/postgres.c:1460
Functionpostgres_prepare_statement
* @brief Prepares a SQL statement with a given name for later execution. * * This function prepares a SQL statement, which can be executed multiple
database/postgres.c:2297
Functionpostgres_print_result
* @brief Prints the result of a query in a tabular format. * * @param pgRes Pointer to the PostgresResult structure containing the query result. *
database/postgres.c:494
Functionpostgres_protocol_version
* @brief Retrieves the protocol version used by the PostgreSQL connection. * * @param pg Pointer to the Postgres structure representing the connect
database/postgres.c:1512
Functionpostgres_put_bytes
* @brief Sends a non-null-terminated string to the PostgreSQL server. * * @param pg Pointer to the Postgres structure representing the connection.
database/postgres.c:1708
Functionpostgres_put_line
* @brief Sends a null-terminated string to the PostgreSQL server. * * @param pg Pointer to the Postgres structure representing the connection. * @
database/postgres.c:1684
Functionpostgres_query_execution_time
* @brief Measures and returns the execution time of a query. * * This function executes a given SQL query on the PostgreSQL database, measures the
database/postgres.c:1874
Functionpostgres_query_params
* @brief Executes a SQL query with parameters in the PostgreSQL database. * * This function allows the execution of parameterized SQL queries to pr
database/postgres.c:2250
Functionpostgres_reconnect
* @brief Disconnects from the PostgreSQL database and attempts to reconnect using the stored connection parameters. * * @param pg Pointer to the Po
database/postgres.c:1815
Functionpostgres_request_cancle
* @brief Sends a request to cancel the currently executed command. * * @param pg Pointer to the Postgres structure representing the connection. *
database/postgres.c:1798
Functionpostgres_reset
* @brief Resets the PostgreSQL connection by closing the existing connection and attempting to reestablish it. * * @param pg Pointer to the Postgre
database/postgres.c:1352
Functionpostgres_reset_start
* @brief Starts a reset of the PostgreSQL connection without blocking. * * @param pg Pointer to the Postgres structure representing the connection.
database/postgres.c:1370
Functionpostgres_rollback_to_savepoint
* @brief Rollback to a specific savepoint within a transaction. * * This function rolls back the current transaction to a specific savepoint, undoin
database/postgres.c:2409
Functionpostgres_rollback_transaction
* @brief Rolls back the current transaction on the PostgreSQL connection. * * @param pg Pointer to the Postgres structure representing the connecti
database/postgres.c:414
Functionpostgres_savepoint
* @brief Create a savepoint in the current transaction. * * This function creates a savepoint within the current transaction, allowing you to rollba
database/postgres.c:2371
Functionpostgres_send_async_query
* @brief Send a query to the server without waiting for the result. * * This function sends a query to the PostgreSQL server in a non-blocking manne
database/postgres.c:2447
Functionpostgres_server_version
* @brief Retrieves the server version of the connected PostgreSQL database. * * @param pg Pointer to the Postgres structure representing the connec
database/postgres.c:1529
Functionpostgres_set_non_blocking
* @brief Sets the PostgreSQL connection to non-blocking or blocking mode. * * @param pg Pointer to the Postgres structure representing the connecti
database/postgres.c:1616
Functionpostgres_socket_descriptor
* @brief Retrieves the socket file descriptor used by the PostgreSQL connection. * * @param pg Pointer to the Postgres structure representing the c
database/postgres.c:1546
Functionpostgres_table_exists
* @brief Checks if a table exists in the PostgreSQL database. * * @param pg Pointer to the Postgres structure representing the connection. * @para
database/postgres.c:591
Functionpostgres_trace
* @brief Enables tracing of the client/server communication to a debugging file stream. * * @param pg Pointer to the Postgres structure representin
database/postgres.c:1729
Functionpostgres_un_trace
* @brief Disables tracing of the client/server communication. * * @param pg Pointer to the Postgres structure representing the connection. */
database/postgres.c:1749
Functionpostgres_user_value
* @brief Retrieves the username used to connect to the database. * * @param pg Pointer to the Postgres structure representing the connection. * @r
database/postgres.c:1406
Functionprint_mem_bool
variant/variant.c:1504
Functionprint_mem_char
variant/variant.c:1499
Functionprint_mem_double
variant/variant.c:1494
Functionprint_mem_float
variant/variant.c:1489
Functionprint_mem_int
variant/variant.c:1479
Functionprint_mem_long
variant/variant.c:1484
Functionprint_mem_ptr
variant/variant.c:1509
Functionprint_mem_string
variant/variant.c:1514
Functionprint_memory_leaks
* @brief Print every live `unittest_malloc` record to stdout. * * Walks the tracking list and emits one * `Memory leak detected: <N> bytes not fr
unittest/unittest.c:251
Functionpriority_queue_assign
* @brief Replace @p dest's contents with the elements of @p src. * * Behavior: * - `dest == src` is a no-op success. * - `dest->itemSize != sr
priority_queue/priority_queue.c:304
Functionpriority_queue_back
* @brief Borrowed pointer to the LAST slot of the underlying heap * storage. * * Diagnostic / iteration helper only — this is NOT in general
priority_queue/priority_queue.c:506
Functionpriority_queue_capacity
* @brief Allocated capacity of the underlying vector. * * Capacity ≥ size; the queue can absorb (capacity − size) more pushes * without re-allocati
priority_queue/priority_queue.c:416
Functionpriority_queue_clear
* @brief Remove every element. Underlying capacity is retained. * * After this call `priority_queue_empty(pq) == true` and * `priority_queue_size(p
priority_queue/priority_queue.c:678
Functionpriority_queue_copy
* @brief Deep-copy an existing priority queue. * * The new queue gets the same item size, comparator, and elements. * Because @p src is already a v
priority_queue/priority_queue.c:249
Functionpriority_queue_emplace
* @brief Construct-in-place and return a borrowed pointer to the * element at its FINAL heap position (after sift-up). * * Equivalent in obs
priority_queue/priority_queue.c:580
Functionpriority_queue_empty
* @brief Returns true if the priority queue has no elements (or is NULL). * * @param pq Queue pointer. NULL is treated as empty (returns true). * @
priority_queue/priority_queue.c:375
Functionpriority_queue_front
* @brief Alias for @ref priority_queue_top. * * Provided for API symmetry with `queue_front` callers. * * @param pq Queue pointer. * @return Same
priority_queue/priority_queue.c:487
Functionpriority_queue_is_greater_or_equal
* @brief Greater-than-or-equal. * * @param a Left queue. * @param b Right queue. * @return `priority_queue_is_greater(a, b) || priority_queue_is_e
priority_queue/priority_queue.c:846
Functionpriority_queue_is_less_or_equal
* @brief Less-than-or-equal. * * @param a Left queue. * @param b Right queue. * @return `priority_queue_is_less(a, b) || priority_queue_is_equal(a
priority_queue/priority_queue.c:830
Functionpriority_queue_is_not_equal
* @brief Inverse of @ref priority_queue_is_equal. * * @param a Left queue. * @param b Right queue. * @return `!priority_queue_is_equal(a, b)`. */
priority_queue/priority_queue.c:768
Functionpriority_queue_item_size
* @brief Bytes per element (as supplied to @ref priority_queue_create). * * @param pq Queue pointer. NULL returns 0. * @return Per-element size in
priority_queue/priority_queue.c:436
Functionpriority_queue_pop
* @brief Remove the highest-priority element (the heap root). * * Swaps the root with the last element, drops the last slot, then * sifts the new r
priority_queue/priority_queue.c:615
Functionpriority_queue_push
* @brief Insert a copy of @p item at the appropriate heap position. * * Copies exactly `priority_queue_item_size(pq)` bytes from @p item * into the
priority_queue/priority_queue.c:543
Functionpriority_queue_reserve
* @brief Pre-allocate underlying storage for at least @p n elements. * * Useful before a tight bulk-push loop to avoid mid-loop reallocations * (ea
priority_queue/priority_queue.c:652
Functionpriority_queue_size
* @brief Number of elements currently in the heap. * * @param pq Queue pointer. NULL returns 0. * @return Element count. */
priority_queue/priority_queue.c:393
Functionpriority_queue_swap
* @brief Constant-time swap of two priority queues' internals. * * Only the underlying vector pointer AND the comparator are swapped * — no element
priority_queue/priority_queue.c:704
Functionqueue_assign
* @brief Replace @p dest's contents with a deep copy of @p src. * * Behavior: * - `dest == src` is a no-op success. * - `dest->itemSize != src
queue/queue.c:170
Functionqueue_at
queue/queue.h:96
Functionqueue_back
queue/queue.h:88
Functionqueue_capacity
* @brief Allocated capacity of the underlying vector. * * Capacity ≥ size; the queue can absorb (capacity - size) more * pushes without re-allocati
queue/queue.c:239
Functionqueue_copy
* @brief Deep-copy an existing queue. * * The returned queue owns its own backing vector and an independent * copy of every element. Element orderi
queue/queue.c:121
Functionqueue_emplace
* @brief Construct-in-place at the back and return a borrowed pointer * to the new element. * * Equivalent in observable behaviour to `queue
queue/queue.c:324
Functionqueue_empty
queue/queue.h:75
Functionqueue_front
queue/queue.h:80
Functionqueue_is_greater_or_equal
* @brief Greater-than-or-equal. * * @param q1 Left queue. * @param q2 Right queue. * @return `queue_is_greater(q1, q2) || queue_is_equal(q1, q2)`.
queue/queue.c:561
Functionqueue_is_less_or_equal
* @brief Less-than-or-equal. * * @param q1 Left queue. * @param q2 Right queue. * @return `queue_is_less(q1, q2) || queue_is_equal(q1, q2)`. */
queue/queue.c:545
Functionqueue_is_not_equal
* @brief Inverse of @ref queue_is_equal. * * @param q1 Left queue. * @param q2 Right queue. * @return `!queue_is_equal(q1, q2)`. */
queue/queue.c:483
Functionqueue_item_size
* @brief Bytes per element (as supplied to @ref queue_create). * * @param q Queue pointer. NULL returns 0. * @return Per-element size in bytes. */
queue/queue.c:259
Functionqueue_pop
queue/queue.h:104
Functionqueue_push
* @brief Push a copy of @p item onto the back of the queue. * * Copies exactly `queue_item_size(q)` bytes from @p item into the * queue. The caller
queue/queue.c:287
Functionqueue_reserve
* @brief Pre-allocate underlying storage for at least @p n elements. * * Useful before a tight bulk-push loop to avoid mid-loop reallocations. * *
queue/queue.c:360
Functionqueue_size
------------------------------------------------------------------ */ Inlined hot accessors */ ----------
queue/queue.h:70
← previousnext →1,901–2,000 of 2,651, ranked by callers