Or I could think of my own format.
Ini files are used as configuration file, not as as a database. If we'd put everything in a table we could as well create our own file format.
Also, with SQLite it's pretty simple to allow an unlimited amount of commands. Consider this table format:
We'd simply put all the commands in a different table. Then we find all the commands by the BatchID and sort them by their Order. A lower order means it will be executed before the commands with a higher order. Here is an example SQL statement. It might not be valid, I've written it from the back of my head.
Code:
<BatchName>
<Tab> <Command1>
<Tab> <Command2>
<Tab> <Command3>
<OtherBatchName>
<Tab> <Command1>
<Tab> <Command2>
Ini files are used as configuration file, not as as a database. If we'd put everything in a table we could as well create our own file format.
Also, with SQLite it's pretty simple to allow an unlimited amount of commands. Consider this table format:
Code:
Batches
BatchName | BatchID
Commands
Command | BatchID | OrderVal
We'd simply put all the commands in a different table. Then we find all the commands by the BatchID and sort them by their Order. A lower order means it will be executed before the commands with a higher order. Here is an example SQL statement. It might not be valid, I've written it from the back of my head.
Code:
SELECT Commands.Command FROM Batches, Commands WHERE Batches.Name = "BatchName" AND Commands.BatchID = Batches.BatchID ORDER BY OrderVal;