Add INSERT, DELETE features to osquery
authorSangwan Kwon <sangwan.kwon@samsung.com>
Tue, 29 Oct 2019 05:53:56 +0000 (14:53 +0900)
committerSangwan Kwon <sangwan.kwon@samsung.com>
Wed, 30 Oct 2019 04:46:01 +0000 (13:46 +0900)
commit6f62199a531c38c4ebd9e71cf46c8414852c0dd3
tree5d0caf44ae1c7c6a5b83ff38272c7eff007ef407
parent4485a3e05fb02be676747f070c3c8bda13dbbfa7
Add INSERT, DELETE features to osquery

- DELETE statement logic -
If the statement has a where clause, xFilter is called.
(otherwise, xUpdate is called directly.)
And xFilter calls VirtualTable::generate to find row matched with
the where clause.
When the row comes out, execute the delete statement through xUpdate.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
src/osquery/sql/virtual_table.cpp
tools/codegen/gentable.py
tools/codegen/templates/default.cpp.in