I hand-edit text files written by other programs, and I create some entirely manually.
I keep these files under change control, so it's very useful to be able to keep
tracking information, historical information, and notes in the text file itself. I
currently run a perl pre-processor on my text files to remove my edits and blank
lines before importing them to Hsqldb. It would be nice if this could be handled
by Hsqldb directly.
I understand that when Hsqldb rewrites the text file, these comments, etc. will
be wiped out, but it is still extremely useful to me to be able to use these features
in my import source files.
Does anybody else think that any of these features would be useful to the general
Hsqldb public, or the opposite?
(1) Safe use of blank lines. It "looks like" blank lines are ok, since the doc says
that when db synces the file it replaces an ignored first line with a blank line. If
blank lines are safe anywhere within an externally created text file, I'd like to
know about it.
(2) Trimming. I've been using shell scripts for many years that use DB flat files
like
value one is long |val2 |val3 |val4 val1b short |val2b long |val3b and |valu4b
(where the delimiter is "|"). The reason for the extra white space is so that the
files line up whether the file is viewed with an ASCII editor, catted, mored, etc.
Otherwise it is a mess like this:
value one is long|val2|val3|val4 val1b short|val2blong|val3b and|val4b
The reason I prefer the first is that you can easily tell which value is for
which field. You can't tell with the latter unless you count delimiters. This can
be implemented by Java trimming each field value. (For backwards compatibility
may want to have a setting to toggle the behavior, but 99% of the time you don't
want values with leading or trailing whitespace in the database).
(3) Comments. It would be nice if the user could specify a comment character
so that you can have comment lines anywhere in the file.
val1|val2|val3|val4
# Commenting out following 2 for this revision because Sam is on vacation
# val11|val12|val13|val14
#val21|val22|val23|val24
val31|val32|val33|val34
-- ICF: 703-934-3692 Cell: 703-944-9317
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
hsqldb-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hsqldb-developers