add: more basic macro stuff
add: more efficient relay loading (only ids)
This commit is contained in:
parent
f67b7e9e0f
commit
0103b0b2ff
7 changed files with 555 additions and 7 deletions
src/models
|
@ -87,3 +87,14 @@ junction_relay_schedule_remove_for_relay(int relay_id)
|
|||
|
||||
return rc == SQLITE_DONE;
|
||||
}
|
||||
|
||||
int*
|
||||
junction_relay_schedule_get_relay_ids_with_schedule(int schedule_id)
|
||||
{
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
sqlite3_prepare_v2(global_database, "SELECT relay_id FROM junction_relay_schedule WHERE schedule_id=?1;", -1, &stmt, NULL);
|
||||
sqlite3_bind_int(stmt, 1, schedule_id);
|
||||
|
||||
return database_helper_get_ids(stmt);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue