android - How can I continuously stream the content of a SQLite table via command line (adb sqlite3) instead of manually pulling it? -
i have batch script shows me content of sqlite db table on real device:
@echo off set packageid=com.brightideahub.motorassistant set databasename=test_event_data.db set tablename=test_table adb shell "su -c 'sqlite3 -header -column /data/data/%packageid%/databases/%databasename% \"select * %tablename%\"'" pause
the problem every time db changes have re-run script see changes. is there way stream content of db, how logcat messages show real-time?
also, have been going through options available sqlite3 command. can explain -batch , -interactive options exactly, , whether use trying achieve?
sqlite3 -help usage: sqlite3 [options] filename [sql] filename name of sqlite database. new database created if file not exist. options include: -bail stop after hitting error -batch force batch i/o -column set output mode 'column' -cmd command run "command" before reading stdin -csv set output mode 'csv' -echo print commands before execution -init filename read/process named file -[no]header turn headers on or off -help show message -html set output mode html -interactive force interactive i/o -line set output mode 'line' -list set output mode 'list' -nullvalue text set text string null values. default '' -separator sep set output field separator. default: '|' -stats print memory stats before each finalize -version show sqlite version -vfs name use name default vfs
the output of logcat
serial stream of new data, makes ability "stream" pretty straight forward. updates sqlite3 database not serial stream of updates, they're random access collection of updates -- means there's nothing stream in logical sense.
Comments
Post a Comment