Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KaisenAmin/c_std
/ functions
Functions
2,651 in github.com/KaisenAmin/c_std
⨍
Functions
2,651
◇
Types & classes
138
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_init
* @brief Initializes the Postgres structure with database connection parameters. * * @param pg Pointer to the Postgres structure to be initialized.
database/postgres.c:60
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_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
Function
postgres_un_trace
* @brief Disables tracing of the client/server communication. * * @param pg Pointer to the Postgres structure representing the connection. */
database/postgres.c:1749
Function
postgres_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
Function
print_mem_bool
variant/variant.c:1504
Function
print_mem_char
variant/variant.c:1499
Function
print_mem_double
variant/variant.c:1494
Function
print_mem_float
variant/variant.c:1489
Function
print_mem_int
variant/variant.c:1479
Function
print_mem_long
variant/variant.c:1484
Function
print_mem_ptr
variant/variant.c:1509
Function
print_mem_string
variant/variant.c:1514
Function
print_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
priority_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
Function
queue_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
Function
queue_at
queue/queue.h:96
Function
queue_back
queue/queue.h:88
Function
queue_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
Function
queue_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
Function
queue_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
Function
queue_empty
queue/queue.h:75
Function
queue_front
queue/queue.h:80
Function
queue_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
Function
queue_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
Function
queue_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
Function
queue_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
Function
queue_pop
queue/queue.h:104
Function
queue_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
Function
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. * *
queue/queue.c:360
Function
queue_size
------------------------------------------------------------------ */ Inlined hot accessors */ ----------
queue/queue.h:70
← previous
next →
1,901–2,000 of 2,651, ranked by callers