Postgresql-odbc -
StatementCacheEntry *find_cached_statement(const char *sql) StatementCacheEntry *curr = statement_cache; while (curr) if (strcmp(curr->sql, sql) == 0) curr->last_used = time(NULL); curr->use_count++; return curr;
// In convert.c SQLRETURN convert_jsonb_to_c( const char *value, SQLSMALLINT target_type, void *target_value, SQLLEN *target_len)
// Add new parameter handling if (strcasecmp(keyword, "MyNewFeature") == 0) strncpy(ci->my_new_param, value, sizeof(ci->my_new_param) - 1); ci->my_new_feature_enabled = atoi(value); postgresql-odbc
// In connection.h typedef struct // ... existing fields char my_new_param[256]; // new parameter int my_new_feature_enabled; ConnectionInfo_; // In connection.c - parse connection string static int parse_connection_string(ConnectionInfo_ *ci, const char *conn_str) // ... existing parsing code
statement_cache = entry; return 0;
entry->statement_name = strdup(name); entry->sql = strdup(sql); entry->last_used = time(NULL); entry->use_count = 1; entry->next = statement_cache;
void end_query_trace(StatementInfo_ *stmt) if (stmt->perf_metrics) stmt->perf_metrics->query_end_time = get_current_time_ms(); uint64_t duration = stmt->perf_metrics->query_end_time - stmt->perf_metrics->query_start_time; while (curr) if (strcmp(curr->
return NULL;