summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarel Ben-Attia <harelba@gmail.com>2017-12-28 08:39:07 +0200
committerGitHub <noreply@github.com>2017-12-28 08:39:07 +0200
commit838cfc2c6924c7bf3b8cc83cff1b26735d091bc5 (patch)
tree08f33d5d74bfed0bc2a9211fdb96779283adfc7f
parent15e9380d96f85ade0d89f618bc6667fdb5b5bc6e (diff)
parenta643c2c93452565c10211f6a9e43b9b94ceb53d2 (diff)
Merge pull request #160 from shigemk2/fix-typo-docs
Fix typo in some docs and script
-rwxr-xr-xbin/q8
-rw-r--r--doc/USAGE.markdown4
-rw-r--r--examples/EXAMPLES.markdown2
3 files changed, 7 insertions, 7 deletions
diff --git a/bin/q b/bin/q
index ac883ab..25d0786 100755
--- a/bin/q
+++ b/bin/q
@@ -1303,7 +1303,7 @@ class QTextAsData(object):
if type(query_str) != unicode:
try:
- # Hueristic attempt to auto convert the query to unicode before failing
+ # Heuristic attempt to auto convert the query to unicode before failing
query_str = query_str.decode('utf-8')
except:
error = QError(EncodedQueryException(''),"Query should be in unicode. Please make sure to provide a unicode literal string or decode it using proper the character encoding.",91)
@@ -1511,7 +1511,7 @@ class QOutputPrinter(object):
# broken pipe, that's ok
pass
else:
- # dont miss other problems for now
+ # don't miss other problems for now
raise
except KeyboardInterrupt:
pass
@@ -1570,7 +1570,7 @@ class QOutputPrinter(object):
# broken pipe, that's ok
pass
else:
- # dont miss other problem for now
+ # don't miss other problem for now
raise
except KeyboardInterrupt:
pass
@@ -1688,7 +1688,7 @@ def run_standalone():
output_data_option_group.add_option("-D", "--output-delimiter", dest="output_delimiter", default=default_output_delimiter,
help="Field delimiter for output. If none specified, then the -d delimiter is used if present, or space if no delimiter is specified")
output_data_option_group.add_option("-T", "--tab-delimited-output", dest="tab_delimited_output", default=False, action="store_true",
- help="Same as -D <tab>. Just a shorthand for outputing tab delimited output. You can use -D $'\\t' if you want.")
+ help="Same as -D <tab>. Just a shorthand for outputting tab delimited output. You can use -D $'\\t' if you want.")
output_data_option_group.add_option("-O", "--output-header", dest="output_header", default=default_output_header, action="store_true",help="Output header line. Output column-names are determined from the query itself. Use column aliases in order to set your column names in the query. For example, 'select name FirstName,value1/value2 MyCalculation from ...'. This can be used even if there was no header in the input.")
output_data_option_group.add_option("-b", "--beautify", dest="beautify", default=default_beautify, action="store_true",
help="Beautify output according to actual values. Might be slow...")
diff --git a/doc/USAGE.markdown b/doc/USAGE.markdown
index a9d7364..bc43021 100644
--- a/doc/USAGE.markdown
+++ b/doc/USAGE.markdown
@@ -98,7 +98,7 @@ Options:
the -d delimiter is used if present, or space if no
delimiter is specified
-T, --tab-delimited-output
- Same as -D <tab>. Just a shorthand for outputing tab
+ Same as -D <tab>. Just a shorthand for outputting tab
delimited output. You can use -D $'\t' if you want.
-O, --output-header
Output header line. Output column-names are determined
@@ -147,7 +147,7 @@ q supports multiple parsing modes:
* `relaxed` - This is the default mode. It tries to lean towards simplicity of use. When a row doesn't contains enough columns, they'll be filled with nulls, and when there are too many, the extra values will be merged to the last column. Defining the number of expected columns in this mode is done using the `-c` parameter. If it is not provided, then the number of columns is detected automatically (In most use cases, there is no need to specify `-c`)
* `strict` - Strict mode is for hardcore csv/tsv parsing. Whenever a row doesn't contain the proper number of columns, processing will stop. `-c` must be provided when using this mode
-* `fluffy` - This mode should not be used, and is just some kind of "backward compatible" parsing mode which was used by q previously. It's left as a separate parsing mode on purpose, in order to accomodate existing users. If you are such a user, please open a bug for your use case, and I'll see how I can incorporate it into the other modes. It is reasonable to say that this mode will be removed in the future.
+* `fluffy` - This mode should not be used, and is just some kind of "backward compatible" parsing mode which was used by q previously. It's left as a separate parsing mode on purpose, in order to accommodate existing users. If you are such a user, please open a bug for your use case, and I'll see how I can incorporate it into the other modes. It is reasonable to say that this mode will be removed in the future.
### Output formatting option
The format of F is as a list of X=f separated by commas, where X is a column number and f is a python format:
diff --git a/examples/EXAMPLES.markdown b/examples/EXAMPLES.markdown
index 162b4d9..0a101e9 100644
--- a/examples/EXAMPLES.markdown
+++ b/examples/EXAMPLES.markdown
@@ -94,7 +94,7 @@ sqlite> select count(*) from `-`;
sqlite>
```
-Note that table names are explictly set to the filenames in the original query (e.g. filenames), which means that in many cases you'd need to escape the table names in sqlite3 with backticks. For example, the name of the table above is `-`, and in order to use it in an sqlite3 query, it is backticked, otherwise it won't conform to a proper table name. I've decided to emphasize consistency and simplicity in this case, instead of trying to provide some normalization/sanitation of filenames, since I believe that doing it would cause much confusion and will be less effective. Any ideas and comments are this are most welcome obviously.
+Note that table names are explicitly set to the filenames in the original query (e.g. filenames), which means that in many cases you'd need to escape the table names in sqlite3 with backticks. For example, the name of the table above is `-`, and in order to use it in an sqlite3 query, it is backticked, otherwise it won't conform to a proper table name. I've decided to emphasize consistency and simplicity in this case, instead of trying to provide some normalization/sanitation of filenames, since I believe that doing it would cause much confusion and will be less effective. Any ideas and comments are this are most welcome obviously.
### Choosing the method of writing the sqlite3 database
There's another parameter that controls the method of writing to the sqlite3 database - `--save-db-to-disk-method`. The value can either be `standard` or `fast`. The fast method requires changes in the packaging of q, since it's dependent on another python module (https://github.com/husio/python-sqlite3-backup by @husio - Thanks!). However, there are some complications with seamlessly packaging it without possibly causing some backward compatibility issues (see PR #159 for some details), so it's not the standard method as of yet. If you're an advanced user, and in need for the faster method due to very large files etc., you'd need to manually install this python package for the fast method to work - Run `pip install sqlitebck` on your python installation. Obviously, I'm considering this as a bug that I need to fix.