Postgresql-odbc Better ⚡ Ad-Free
entry->statement_name = strdup(name); entry->sql = strdup(sql); entry->last_used = time(NULL); entry->use_count = 1; entry->next = statement_cache;
return SQL_SUCCESS; // In performance.c - new file for performance features typedef struct uint64_t query_start_time; uint64_t query_end_time; char last_query[4096]; int slow_query_threshold_ms; PerformanceMetrics; void start_query_trace(StatementInfo_ *stmt, const char *query) if (stmt->perf_metrics) stmt->perf_metrics->query_start_time = get_current_time_ms(); strncpy(stmt->perf_metrics->last_query, query, sizeof(stmt->perf_metrics->last_query) - 1); postgresql-odbc
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; statement_name = strdup(name)
// 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 sql = strdup(sql)
return NULL;
