/ Check-in [252ee55a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Better whitespace in the "CREATE TABLE sqlar()" statement for the ".ar" command.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 252ee55a7fc0b068b707af27bd912e684c28320996e78f0675217046b8c2fb49
User & Date: drh 2018-01-06 15:49:57
Context
2018-01-06
19:19
In the shell, include the ".archive" command only if compiling with SQLITE_HAVE_ZLIB. Add ".archive" to the ".help" output. check-in: 366469f5 user: drh tags: trunk
15:49
Better whitespace in the "CREATE TABLE sqlar()" statement for the ".ar" command. check-in: 252ee55a user: drh tags: trunk
15:46
Improved output from ".schema --indent" when a column definition is followed by a comment. check-in: 87da7eff user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
  ShellState *p,                  /* Shell state pointer */
  sqlite3 *db,
  ArCommand *pAr,                 /* Command arguments and options */
  int bUpdate
){
  const char *zSql = "SELECT name, mode, mtime, data FROM fsdir(?, ?)";
  const char *zCreate = 
      "CREATE TABLE IF NOT EXISTS sqlar("
      "name TEXT PRIMARY KEY,  -- name of the file\n"
      "mode INT,               -- access permissions\n"
      "mtime INT,              -- last modification time\n"
      "sz INT,                 -- original file size\n"
      "data BLOB               -- compressed content\n"
  ")";
  const char *zDrop = "DROP TABLE IF EXISTS sqlar";
  const char *zInsert = "REPLACE INTO sqlar VALUES(?,?,?,?,sqlar_compress(?))";

  sqlite3_stmt *pStmt = 0;        /* Directory traverser */
  sqlite3_stmt *pInsert = 0;      /* Compilation of zInsert */
  int i;                          /* For iterating through azFile[] */
  int rc;                         /* Return code */







|
|
|
|
|
|
|







4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
  ShellState *p,                  /* Shell state pointer */
  sqlite3 *db,
  ArCommand *pAr,                 /* Command arguments and options */
  int bUpdate
){
  const char *zSql = "SELECT name, mode, mtime, data FROM fsdir(?, ?)";
  const char *zCreate = 
      "CREATE TABLE IF NOT EXISTS sqlar(\n"
      "  name TEXT PRIMARY KEY,  -- name of the file\n"
      "  mode INT,               -- access permissions\n"
      "  mtime INT,              -- last modification time\n"
      "  sz INT,                 -- original file size\n"
      "  data BLOB               -- compressed content\n"
      ")";
  const char *zDrop = "DROP TABLE IF EXISTS sqlar";
  const char *zInsert = "REPLACE INTO sqlar VALUES(?,?,?,?,sqlar_compress(?))";

  sqlite3_stmt *pStmt = 0;        /* Directory traverser */
  sqlite3_stmt *pInsert = 0;      /* Compilation of zInsert */
  int i;                          /* For iterating through azFile[] */
  int rc;                         /* Return code */