68int db_init(
const char* db_path);
89 const char* system_prompt,
const char* model);
120 const char* system_prompt,
const char* model);
int db_delete_test_suite(int id)
Delete a test suite (cascading deletes associated user prompts).
UserPrompt ** db_get_user_prompts_by_suite(int test_suite_id, int *count)
Retrieve all user prompts for a specific test suite.
void db_close(void)
Close the database connection and release any resources.
TestSuite * db_get_test_suite(int id)
Retrieve a test suite by ID.
void db_free_test_suite(TestSuite *suite)
Free a TestSuite structure.
int db_create_user_prompt(const char *prompt, int test_suite_id)
Create a new user prompt associated with a test suite.
int db_update_test_suite(int id, const char *title, const char *description, const char *system_prompt, const char *model)
Update an existing test suite.
UserPrompt * db_get_user_prompt(int id)
Retrieve a user prompt by ID.
void db_free_user_prompts(UserPrompt **prompts, int count)
Free an array of UserPrompt structures.
UserPrompt ** db_get_all_user_prompts(int *count)
Retrieve all user prompts.
int db_init(const char *db_path)
Initialize the database.
void db_free_user_prompt(UserPrompt *prompt)
Free a UserPrompt structure.
int db_update_user_prompt(int id, const char *prompt, int test_suite_id)
Update an existing user prompt.
TestSuite ** db_get_all_test_suites(int *count)
Retrieve all test suites.
int db_delete_user_prompt(int id)
Delete a user prompt.
int db_create_test_suite(const char *title, const char *description, const char *system_prompt, const char *model)
Create a new test suite.
void db_free_test_suites(TestSuite **suites, int count)
Free an array of TestSuite structures.
Represents a test suite in the database.
Represents a user prompt associated with a test suite.