Delete records
Deletes records from the table
- Parameters
- Advanced call ?
Function DeleteRecords(Val Table, Val Filters = "", Val Connection = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Table | --table | String | ✔ | Table name |
| Filters | --filter | Array of Structure | ✖ | Filters array. See GetRecordsFilterStructure |
| Connection | --db | String, Arbitrary | ✖ | Existing connection or database path |
Returns
Map Of KeyAndValue - Result of query execution
| Parameter | Description |
|---|---|
| addin_mode | Manual selection of external component connection mode (for 1C): Isolated, NotIsolated |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Base = "/tmp/vnnmoosn.qqb.sqlite";
Table = "test";
Filters = New Array;
FilterStructure = New Structure;
FilterStructure.Insert("field", "name");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", "Vitaly A.");
FilterStructure.Insert("union", "AND");
FilterStructure.Insert("raw" , False);
Filters.Add(FilterStructure);
Result = OPI_SQLite.DeleteRecords(Table, FilterStructure, Base);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint sqlite DeleteRecords \
--table "test" \
--filter "{'field':'name','type':'=','value':'Vitaly A.','union':'AND','raw':false}" \
--db "/tmp/v3fibjxn.cs0.sqlite"
:: JSON data can also be passed as a path to a .json file
oint sqlite DeleteRecords ^
--table "test" ^
--filter "{'field':'name','type':'=','value':'Vitaly A.','union':'AND','raw':false}" ^
--db "/tmp/v3fibjxn.cs0.sqlite"
Result
{
"result": true
}