Commit Graph

17 Commits

Author SHA1 Message Date
mistachkin a0efb1ae11 For the shell '.import' command, make sure the last column value present is considered before NULL filling any missing ones.
FossilOrigin-Name: 9c5bcad1f7d04c16f3ec7fc483280059ae93961b
2015-02-12 22:45:25 +00:00
drh fa5ed0283c Add the "ascii" mode to the command-line shell.
FossilOrigin-Name: e1518a9478e1ce1ebd98894335e64c953064367f
2015-01-09 00:38:06 +00:00
mistachkin e0d6885f17 Simplify and cleanup the implementation of the new ASCII mode for the shell.
FossilOrigin-Name: 66a28f7abaeaf1ebe6e43d856af88ac64b1ff230
2014-12-11 03:12:33 +00:00
mistachkin fad4208f2f Merge updates from trunk.
FossilOrigin-Name: 8dc0cdf652f099d464d3de416dffd83efb895009
2014-07-24 22:13:12 +00:00
drh 6976c2123b In the command-line shell, in CSV output mode, terminate rows with CRNL but
do not expand NL characters in data into CRNL.  Provide the extra -newline
command-line option and the extra argument to .separator to designate an
alternative newline character sequence for CSV output.

FossilOrigin-Name: 16c8ce10e1530731441e6c4538691b71564684ed
2014-07-24 12:09:47 +00:00
mistachkin 636bf9f768 Add new ASCII mode to the shell capable of importing and exporting using the official unit and record separators (i.e. 0x1F and 0x1E, respectively).
FossilOrigin-Name: 7fe601ead0d0ae26cb09d0dbc7d6367785376567
2014-07-19 20:15:16 +00:00
mistachkin 6fe0338ca9 Fix CSV import issue, reported via the mailing list, in the shell when the file to be imported ends with an empty line.
FossilOrigin-Name: fc918f7d332b8f7cabc79a0f1586bd6760d14d40
2014-06-16 22:45:28 +00:00
drh c2ce0bea88 Improvements to error messages for errors in the dot-commands of the
command-line shell.  Add the ".once" command.  The output of ".help"
now goes to the designated output channel.

FossilOrigin-Name: 48dce821a07ac29da6ce05e92cf3f6e52b6eb388
2014-05-29 12:36:14 +00:00
dan 6a8ac852aa Fix a problem in the shell when importing CSV files. If the leftmost field of the first row in the CSV file was both zero bytes in size and unquoted, no data was imported.
FossilOrigin-Name: 856d44a206d82e96265103556dedda39ca3602b1
2014-05-26 18:27:12 +00:00
drh 3852b68edd In the command-line shell for CSV import, if the lines are \r\n terminated
and the last field is blank, make sure an empty string and not a "\r" string
is imported.

FossilOrigin-Name: 9c2e7612cd137895e13ee872e668ce1216719d85
2014-02-26 13:53:34 +00:00
drh a81ad1758c Fix a bug in the shell ".import" command: Do not end the field
when an escaped double-quote occurs at the end of a CRNL line.

FossilOrigin-Name: 5e239ecda0f7835ce037b38b04627a574b5854cd
2013-12-11 14:00:04 +00:00
mistachkin 9ac99313b5 Fix test issues for Windows portability.
FossilOrigin-Name: 650b32825a85baff11b8e568649fd797066c8ab1
2013-09-13 23:26:47 +00:00
drh 868ccf2679 Fix an off-by-one error that causes a quoted empty string at the end of
a CRNL-terminated line of CSV input to be misread by the shell.

FossilOrigin-Name: b5617e4fdadc4cded93c985008e90982dd48bc3b
2013-08-28 13:33:40 +00:00
drh f7f8de5fb2 Add a test case for empty quoted field in CSV import in the shell.
FossilOrigin-Name: 3df56e849164811117f9ac8ee2aee1eee188bb96
2013-08-28 11:57:52 +00:00
drh 5bde816599 If the filename argument to the ".import" command in the command-line shell
begins with '|' then treat it as an input pipe rather than a file.

FossilOrigin-Name: 4c02b344f5c6f6fb1c61b79d51063a1e0e2d75c0
2013-06-27 14:07:53 +00:00
drh db95f68b14 Update the ".import" command of the command-line shell so that it can
accept field values that span multiple lines and so that it issues
error messages if the input text does not strictly conform to RFC4180.

FossilOrigin-Name: 93f632152e464a89322a0130adaf9f342411bf7d
2013-06-26 22:46:00 +00:00
drh 8df9185ce4 Move the shell test scripts into the test/ subfolder so that they are
run automatically by "make test".

FossilOrigin-Name: 9fb7da6904e479f4671eeebf1a4b7e4e4e4f2b7b
2012-04-24 12:46:05 +00:00