Tdd create
From TaskDepender
(→Design) |
(→Implementation) |
||
Line 8: | Line 8: | ||
* Creates the TaskDepender database in the specified file. | * Creates the TaskDepender database in the specified file. | ||
*/ | */ | ||
− | + | HANDLE tdd_create | |
( | ( | ||
char *filename // Filename of the database file to create. | char *filename // Filename of the database file to create. | ||
Line 44: | Line 44: | ||
if(rc) | if(rc) | ||
{ | { | ||
− | |||
− | |||
sqlite3_close(db); | sqlite3_close(db); | ||
− | |||
return &db; | return &db; | ||
} | } | ||
// -- Create tasks table -- | // -- Create tasks table -- | ||
− | + | rc = sqlite3_exec(db, TDD_CREATE_TASKS_TABLE, NULL, NULL, &dbError ); | |
+ | |||
// -- Create deliverables table -- | // -- Create deliverables table -- | ||
+ | rc = sqlite3_exec(db, TDD_CREATE_DELIVERABLES_TABLE, NULL, NULL, &dbError ); | ||
− | + | // -- Create the connections table -- | |
− | + | rc = sqlite3_exec(db, TDD_CREATE_CONNECTIONS_TABLE, NULL, NULL, &dbError ); | |
+ | |||
+ | // -- Create the temporary task-list table -- | ||
+ | rc = sqlite3_exec(db, TDD_CREATE_TASKLIST_TABLE, NULL, NULL, &dbError ); | ||
+ | |||
+ | // -- Create the temporary deliverable-list table -- | ||
+ | rc = sqlite3_exec(db, TDD_CREATE_TASKS_TABLE, NULL, NULL, &dbError ); | ||
+ | |||
+ | // -- Create the temporary connection-list table -- | ||
+ | rc = sqlite3_exec(db, TDD_CREATE_TASKS_TABLE, NULL, NULL, &dbError ); | ||
Line 62: | Line 70: | ||
return &db; | return &db; | ||
+ | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||