Function __global->make_dummy_db_row
Definitions
sources/developer_tools.php
- Generate a row of random dummy data into the database.Ideally, you should instead run the stress test loader, but this is useful for quick tests utilising specific tables in the database.You should immediately delete the rows after use.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: array
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$table | ID_TEXT | required parameter | N/A | N/A | The name of the table to generate dummy data |
$allow_null | boolean | True | N/A | N/A | Whether to randomly save null values in nullable columns (false: a value is always saved even if nullable unless explicitly defined in $forced_values) |
$forced_values | array | [] | N/A | N/A | A map of fields => values that should be used instead of randomness |
Return
- Map of primary fields associated with the row created
- Type: array
- Set: N/A
- Range: N/A