Documentation Source Text

Check-in [bf3c223723]
Login

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

Overview
Comment:Update the CLI documentation to describe the new --insert option to ".archive" and the behavior change to the --update option.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:bf3c223723932d65e8814c8f2ab69d927234eeaed2aa0ab73714396c94847d18
User & Date: drh 2019-03-25 15:19:06
Context
2019-03-25
20:56
Updates to the change log for 3.28.0. check-in: 32b82e8386 user: drh tags: trunk
20:49
Update documentation to match the proposed window function changes. Closed-Leaf check-in: 783032878d user: dan tags: window-functions
15:19
Update the CLI documentation to describe the new --insert option to ".archive" and the behavior change to the --update option. check-in: bf3c223723 user: drh tags: trunk
14:30
Fix a documentation error: The preprocessor macro is SQLITE_HAVE_ZLIB, not SQLITE_USE_ZLIB. However the USE_ZLIB=1 option is what Makefile.msc expects. check-in: 85f5f65d9f user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/cli.in.

861
862
863
864
865
866
867

868
869
870
871
872
873
874
875
876
...
957
958
959
960
961
962
963
964
965
966
967
968
969
970








971
972
973
974
975
976
977
command must specify a single command option. The following commands
are available for ".archive":

<table striped=1>
  <tr><th style="width:15ex">Option<th style="width:17ex">Long&nbsp;Option<th>Purpose
  <tr><td>-c<td>--create<td>Create a new archive containing specified files.
  <tr><td>-x<td>--extract<td>Extract specified files from archive.

  <tr><td>-t<td>--list<td>List the files in the archive.
  <tr><td>-u<td>--update<td>Add files to existing archive.
</table>

<p>As well as the command option, each invocation of ".ar" may specify
one or more modifier options. Some modifier options require an argument,
some do not. The following modifier options are available:

<table striped=1>
................................................................................
change in the future.

<codeblock>
  <i>-- List contents of archive in current "main" db.</i>.
  .ar --list
</codeblock>

<h2> SQLite Archive Update Command </h2>

<p> This command works the same way as the --create command, except that 
it does not delete the current archive before commencing. New versions of
files silently replace existing files with the same names, but otherwise
the initial contents of the archive (if any) remain intact.










<h2> Operations On ZIP Archives </h2>

<p>If FILE is a ZIP archive rather than an SQLite Archive, the ".archive"
command and the "-A" command-line option still work.  This is accomplished
using of the [zipfile] extension.
Hence, the following commands are roughly equivalent,







>

|







 







|

|
|



>
>
>
>
>
>
>
>







861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
...
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
command must specify a single command option. The following commands
are available for ".archive":

<table striped=1>
  <tr><th style="width:15ex">Option<th style="width:17ex">Long&nbsp;Option<th>Purpose
  <tr><td>-c<td>--create<td>Create a new archive containing specified files.
  <tr><td>-x<td>--extract<td>Extract specified files from archive.
  <tr><td>-i<td>--insert<td>Add files to existing archive.
  <tr><td>-t<td>--list<td>List the files in the archive.
  <tr><td>-u<td>--update<td>Add files to existing archive <em>if</em> they have changed.
</table>

<p>As well as the command option, each invocation of ".ar" may specify
one or more modifier options. Some modifier options require an argument,
some do not. The following modifier options are available:

<table striped=1>
................................................................................
change in the future.

<codeblock>
  <i>-- List contents of archive in current "main" db.</i>.
  .ar --list
</codeblock>

<h2> SQLite Archive Insert And Update Commands </h2>

<p> The --update and --insert commands work like --create command, except that 
they do not delete the current archive before commencing. New versions of
files silently replace existing files with the same names, but otherwise
the initial contents of the archive (if any) remain intact.

<p> For the --insert command, all files listed are inserted into the archive.
For the --update command, files are only inserted if they do not previously
exist in the archive, or if their "mtime" or "mode" is different from what
is currently in the archive.

<p> Compatibility node:  Prior to SQLite version 3.28.0 ([dateof:3.28.0]) only
the --update option was supported but that option worked like --insert in that
it always reinserted every file regardless of whether or not it had changed.

<h2> Operations On ZIP Archives </h2>

<p>If FILE is a ZIP archive rather than an SQLite Archive, the ".archive"
command and the "-A" command-line option still work.  This is accomplished
using of the [zipfile] extension.
Hence, the following commands are roughly equivalent,