add write to sqlite function

Signed-off-by: Greg Huang <greg65236592@yahoo.com>