Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I continuously stream the content of a SQLite table via command line (adb sqlite3) instead of manually pulling it?
    primarykey
    data
    text
    <p>I have a batch script which shows me the content of an SQLite db table on a real device:</p> <pre><code> @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 * FROM %tableName%\"'" pause </code></pre> <p>The problem is that every time the DB changes I have to re-run this script to see the changes. <strong>Is there a way to stream the content of the DB, similarly how logcat messages show real-time?</strong></p> <p>Also, I have been going through the options available for the sqlite3 command. Can anyone explain what the <em>-batch</em> and <em>-interactive</em> options do exactly, and whether they would be any use for what I am trying to achieve?</p> <pre><code> sqlite3 -help Usage: sqlite3 [OPTIONS] FILENAME [SQL] FILENAME is the name of an SQLite database. A new database is created if the file does not previously exist. OPTIONS include: -bail stop after hitting an error -batch force batch I/O -column set output mode to 'column' -cmd COMMAND run "COMMAND" before reading stdin -csv set output mode to 'csv' -echo print commands before execution -init FILENAME read/process named file -[no]header turn headers on or off -help show this message -html set output mode to HTML -interactive force interactive I/O -line set output mode to 'line' -list set output mode to 'list' -nullvalue TEXT set text string for 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 as the default VFS </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload