10000 Fix typo in some docs and script · pythonthings/q@a643c2c · GitHub
[go: up one dir, main page]

Skip to content

Commit a643c2c

Browse files
committed
Fix typo in some docs and script
1 parent 15e9380 commit a643c2c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

bin/q

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ class QTextAsData(object):
13031303

13041304
if type(query_str) != unicode:
13051305
try:
1306-
# Hueristic attempt to auto convert the query to unicode before failing
1306+
# Heuristic attempt to auto convert the query to unicode before failing
13071307
query_str = query_str.decode('utf-8')
13081308
except:
13091309
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):
15111511
# broken pipe, that's ok
15121512
pass
15131513
else:
1514-
# dont miss other problems for now
1514+
# don't miss other problems for now
15151515
raise
15161516
except KeyboardInterrupt:
15171517
pass
@@ -1570,7 +1570,7 @@ class QOutputPrinter(object):
15701570
# broken pipe, that's ok
15711571
pass
15721572
else:
1573-
# dont miss other problem for now
1573+
# don't miss other problem for now
15741574
raise
15751575
except KeyboardInterrupt:
15761576
pass
@@ -1688,7 +1688,7 @@ def run_standalone():
16881688
output_data_option_group.add_option("-D", "--output-delimiter", dest="output_delimiter", default=default_output_delimiter,
16891689
help="Field delimiter for output. If none specified, then the -d delimiter is used if present, or space if no delimiter is specified")
16901690
output_data_option_group.add_option("-T", "--tab-delimited-output", dest="tab_delimited_output", default=False, action="store_true",
1691-
help="Same as -D <tab>. Just a shorthand for outputing tab delimited output. You can use -D $'\\t' if you want.")
1691+
help="Same as -D <tab>. Just a shorthand for outputting tab delimited output. You can use -D $'\\t' if you want.")
16921692
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.")
16931693
output_data_option_group.add_option("-b", "--beautify", dest="beautify", default=default_beautify, action="store_true",
16941694
help="Beautify output according to actual values. Might be slow...")

doc/USAGE.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Options:
9898
the -d delimiter is used if present, or space if no
9999
delimiter is specified
100100
-T, --tab-delimited-output
101-
Same as -D <tab>. Just a shorthand for outputing tab
101+
Same as -D <tab>. Just a shorthand for outputting tab
102102
delimited output. You can use -D $'\t' if you want.
103103
-O, --output-header
104104
Output header line. Output column-names are determined
@@ -147,7 +147,7 @@ q supports multiple parsing modes:
147147

148148
* `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`)
149149
* `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
150-
* `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.
150+
* `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.
151151

152152
### Output formatting option
153153
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:

examples/EXAMPLES.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ sqlite> select count(*) from `-`;
9494
sqlite>
9595
```
9696

97-
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.
97+
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.
9898

9999
### Choosing the method of writing the sqlite3 database
100100
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.

0 commit comments

Comments
 (0)
0