Skip to content

Commit

Permalink
Release v1.17.9
Browse files Browse the repository at this point in the history
- Sort the command options displayed in the help message. ([GitHub #80](#80))
- Fix some bugs.
  • Loading branch information
mithrandie committed Aug 14, 2022
2 parents a31eff9 + bb8e7a7 commit ceb66bf
Show file tree
Hide file tree
Showing 75 changed files with 5,860 additions and 5,296 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## Version 1.17.9

Released on Aug 14, 2022

- Sort the command options displayed in the help message. ([GitHub #80](https://github.com/mithrandie/csvq/issues/80))
- Fix some bugs.

## Version 1.17.8

Released on Jul 24, 2022
Expand Down Expand Up @@ -189,7 +196,7 @@ Released on January 12, 2020

Released on December 12, 2019

- Prevent query results from being written when the results is empty. ([Github #21](https://github.com/mithrandie/csvq/issues/21))
- Prevent query results from being written when the results are empty. ([Github #21](https://github.com/mithrandie/csvq/issues/21))

## Version 1.11.7

Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-analytic-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ _order_by_clause_
_return_
: [integer]({{ '/reference/value.html#integer' | relative_url }})

Splits the records into _number_of_groups_ groups, then returns the sequential numbers of the groups.
Splits the records into _number_of_groups_, then returns the sequential numbers of the groups.


### FIRST_VALUE
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-arithmetic-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ value operator value
_value_
: [value]({{ '/reference/value.html' | relative_url }})

An binary arithmetic operator calculate integer or float values, and return the result.
A binary arithmetic operator calculate integer or float values, and return the result.

If either of operands is null or the conversions to integer or float failed, return null.

Expand Down
328 changes: 165 additions & 163 deletions docs/_posts/2006-01-02-command.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-common-table-expression.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ category: reference

# Common Table Expression

A Common Table Expression in a _with clause_ declare a inline table that can be referenced in a single query.
A Common Table Expression in a _with clause_ declare an inline table that can be referenced in a single query.
You can use the views in a [Select Query]({{ '/reference/select-query.html' | relative_url }}), [Insert Query]({{ '/reference/insert-query.html' | relative_url }}), [Update Query]({{ '/reference/update-query.html' | relative_url }}), or [Delete Query]({{ '/reference/delete-query.html' | relative_url }}).

## Syntax
Expand Down
22 changes: 11 additions & 11 deletions docs/_posts/2006-01-02-comparison-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ category: reference
| [LIKE](#like) | Check if a string matches a pattern |
| [IN](#in) | Check if a value is within a set of values |
| [ANY](#any) | Check if any of values fulfill conditions |
| [ALL](#all) | Check if all of values fulfill conditions |
| [ALL](#all) | Check if all values fulfill conditions |
| [EXISTS](#exists) | Check if a subquery returns at least one row |

A comparison operator returns a ternary value.

## Relational Operators
{: #relational_operators}

| operator | description |
| :------- | :---------- |
| \= | LHS is equal to RHS |
| operator | description |
|:---------|:----------------------------------------------------------|
| \= | LHS is equal to RHS |
| \=\= | LHS and RHS are of the same type, and LHS is equal to RHS |
| < | LHS is less than RHS |
| <\= | LHS is less than or equal to RHS |
| > | LHS is greater than RHS |
| >\= | LHS is greater than or equal to RHS |
| <>, !\= | LHS is not equal to RHS |
| < | LHS is less than RHS |
| <\= | LHS is less than or equal to RHS |
| > | LHS is greater than RHS |
| >\= | LHS is greater than or equal to RHS |
| <>, !\= | LHS is not equal to RHS |

```sql
relational_operation
Expand Down Expand Up @@ -197,7 +197,7 @@ _multiple_fields_subquery_
Compare _value_ or _row_value_ to each listed _values_ or each records retrieved by _select_query_.
If any of comparison results is TRUE, returns TRUE.
If there is no TRUE result and there is at least one UNKNOWN result, returns UNKNOWN.
Otherwise returns FALSE.
Otherwise, returns FALSE.

If _select_query_ returns no record, returns FALSE.

Expand Down Expand Up @@ -230,7 +230,7 @@ _multiple_fields_subquery_
Compare _value_ or _row_value_ to every listed _values_ or each records retrieved by _select_query_.
If any of comparison results is FALSE, returns FALSE.
If there is no FALSE result and there is at least one UNKNOWN result, returns UNKNOWN.
Otherwise returns TRUE.
Otherwise, returns TRUE.

If _select_query_ returns no record, returns TRUE.

Expand Down
6 changes: 3 additions & 3 deletions docs/_posts/2006-01-02-control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _condition_
_statements_
: [Statements]({{ '/reference/statement.html' | relative_url }})

A If statement executes the first _statements_ that _condition_ is TRUE.
IF statement executes the first _statements_ that _condition_ is TRUE.
If no condition is TRUE, the _statements_ of the ELSE expression are executed.

## CASE
Expand Down Expand Up @@ -124,7 +124,7 @@ A While In statement fetch the data from the [cursor]({{ '/reference/cursor.html
The While In statement iterates it until the _cursor_name_ pointer reaches the last record in the referring view.

If DECLARE or VAR keyword is specified, then variables are declared in the child scope.
Otherwise variables in the current scope is used to fetch.
Otherwise, variables in the current scope is used to fetch.

## CONTINUE
{: #continue}
Expand Down Expand Up @@ -156,7 +156,7 @@ _exit_code_

0 is the default.

A Exit statement stops statements execution, then terminates the executing procedure without commit.
Exit statement stops statements execution, then terminates the executing procedure without commit.

## TRIGGER ERROR
{: #trigger_error}
Expand Down
12 changes: 6 additions & 6 deletions docs/_posts/2006-01-02-cryptographic-hash-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ _data_
_return_
: [string]({{ '/reference/value.html#string' | relative_url }})

Generates a SHA-1 hash value.
Generates an SHA-1 hash value.

### SHA256
{: #sha256}
Expand All @@ -62,7 +62,7 @@ _data_
_return_
: [string]({{ '/reference/value.html#string' | relative_url }})

Generates a SHA-256 hash value.
Generates an SHA-256 hash value.

### SHA512
{: #sha512}
Expand All @@ -77,7 +77,7 @@ _data_
_return_
: [string]({{ '/reference/value.html#string' | relative_url }})

Generates a SHA-512 hash value.
Generates an SHA-512 hash value.

### MD5_HMAC
{: #md5_hmac}
Expand Down Expand Up @@ -113,7 +113,7 @@ _key_
_return_
: [string]({{ '/reference/value.html#string' | relative_url }})

Generates a SHA-1 keyed-hash value using the HMAC method.
Generates an SHA-1 keyed-hash value using the HMAC method.

### SHA256_HMAC
{: #sha256_hmac}
Expand All @@ -131,7 +131,7 @@ _key_
_return_
: [string]({{ '/reference/value.html#string' | relative_url }})

Generates a SHA-256 keyed-hash value using the HMAC method.
Generates an SHA-256 keyed-hash value using the HMAC method.

### SHA512_HMAC
{: #sha512_hmac}
Expand All @@ -149,4 +149,4 @@ _key_
_return_
: [string]({{ '/reference/value.html#string' | relative_url }})

Generates a SHA-512 keyed-hash value using the HMAC method.
Generates an SHA-512 keyed-hash value using the HMAC method.
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-datetime-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ _return_

Returns the week number of the year of _datetime_ as an integer.
The week number is in the range from 1 to 53.
Jan 01 to Jan 03 of a year might returns week 52 or 53 of the last year, and Dec 29 to Dec 31 might returns week 1 of the next year.
Jan 01 to Jan 03 of a year might return week 52 or 53 of the last year, and Dec 29 to Dec 31 might return week 1 of the next year.

### ADD_YEAR
{: #add_year}
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ADD value TO @@DATETIME_FORMAT;
_value_
: [string]({{ '/reference/value.html#string' | relative_url }})

A Add Flag Element statement is used to add datetime formats to _@@DATETIME_FORMAT_.
An Add Flag Element statement is used to add datetime formats to _@@DATETIME_FORMAT_.

You can use JSON array of strings to set multiple format at once.

Expand Down
10 changes: 5 additions & 5 deletions docs/_posts/2006-01-02-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ JSON data must be conforming to the [RFC8259](https://www.rfc-editor.org/info/rf
Value Identifier
: A value identifier is used to represent an object member.

A identifier is a word starting with any unicode letter or a Low Line(U+005F '\_') and followed by a character string that contains any unicode letters, any digits or Low Lines(U+005F '\_').
AN identifier is a word starting with any unicode letter or a Low Line(U+005F '\_') and followed by a character string that contains any unicode letters, any digits or Low Lines(U+005F '\_').
You can use most character strings as an identifier by enclosing in Back Quotes(U+0060 `), Single Quotes(U+0027 ') or Double Quotes(U+0022 ").
Quotation Marks are escaped by back slashes.
Quotation Marks are escaped by backslashes.

Array Index
: Number of json array elements starting with 0.
Expand Down Expand Up @@ -69,11 +69,11 @@ field
| field_name as alias
```

_object_member_ and _array_element_ returns null if the element does not exists.
_object_member_ and _array_element_ returns null if the element does not exist.

_json_array_ format a json data in an array.
_object_array_ format a json data in an array that's all elements are objects.
_json_array_ and _array_of_objects_ cause an error if the element does not exists or fails to be converted.
_json_array_ and _array_of_objects_ cause an error if the element does not exist or fails to be converted.

### Examples

Expand Down Expand Up @@ -121,7 +121,7 @@ SELECT * FROM users WHERE id IN JSON_ROW('[].id', @json);

[--format option]({{ '/reference/command.html#options' | relative_url }}) and [JSON_OBJECT]({{ '/reference/string-functions.html#json_object' | relative_url }}) function generate a json data from a view.

A record in a view will be converted to an json object.
A record in a view will be converted to a json object.
Object member names are generated from field names in the view.
A period(U+002E '.') in a column name is used to separate values and that represents a child object.

Expand Down
4 changes: 2 additions & 2 deletions docs/_posts/2006-01-02-logic-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _condition_

If either of conditions is FALSE, then return FALSE.
If both of conditions are not FALSE, and either of conditions is UNKNOWN, then return UNKNOWN.
Otherwise return TRUE.
Otherwise, return TRUE.

## OR
{: #or}
Expand All @@ -40,7 +40,7 @@ _condition_

If either of conditions is TRUE, then return TRUE.
If both of conditions are not TRUE, and either of conditions is UNKNOWN, then return UNKNOWN.
Otherwise return FALSE.
Otherwise, return FALSE.

## NOT
{: #not}
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-logical-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ _value2_
_return_
: [primitive type]({{ '/reference/value.html#primitive_types' | relative_url }})

If _condition_ is TRUE, then returns _value1_. Otherwise returns _value2_.
If _condition_ is TRUE, then returns _value1_. Otherwise, returns _value2_.

### IFNULL
{: #ifnull}
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-numeric-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ _oct_
_return_
: [integer]({{ '/reference/value.html#integer' | relative_url }})

Converts _hex_ representing a octal number to an integer.
Converts _hex_ representing an octal number to an integer.

### HEX_TO_DEC
{: #hex_to_dec}
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-operator-precedence.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ category: reference

# Operator Precedence

The following table list operators from highest precedence to lowest.
The following table list operators from the highest precedence to lowest.

| precedence | operators | associativity |
| :- | :- | :- |
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-replace-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ category: reference

Replace query is used to insert or update records to a csv file.

If records matching _key_columns_ exist, the records are updated. Otherwise insert records.
If records matching _key_columns_ exist, the records are updated. Otherwise, insert records.

## Insert or Update Values

Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-row-value.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ category: reference

# Row Value

A Row Value is a ordered list of values.
A Row Value is an ordered list of values.

```sql
row_value
Expand Down
8 changes: 4 additions & 4 deletions docs/_posts/2006-01-02-select-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ table

table_entity
: table_identifier
| table_object
| inline_table_object
| format_specified_function
| inline_format_specified_function

table_identifier
: table_name
Expand Down Expand Up @@ -162,14 +162,14 @@ table_identification_function
: URL::(url_string)
: DATA::(data_string)

table_object
format_specified_function
: CSV(delimiter, table_identifier [, encoding [, no_header [, without_null]]])
| FIXED(delimiter_positions, table_identifier [, encoding [, no_header [, without_null]]])
| JSON(json_query, table_identifier)
| JSONL(json_query, table_identifier)
| LTSV(table_identifier [, encoding [, without_null]])

inline_table_object -- Deprecated. Table identification functions can be used instead.
inline_format_specified_function -- Deprecated. Table identification functions can be used instead.
: CSV_INLINE(delimiter, inline_table_identifier [, encoding [, no_header [, without_null]]])
| CSV_INLINE(delimiter, csv_data)
| JSON_INLINE(json_query, inline_table_identifier [, encoding [, no_header [, without_null]]])
Expand Down
6 changes: 3 additions & 3 deletions docs/_posts/2006-01-02-statement.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ Identifier
You cannot use [reserved words](#reserved_words) as an identifier.

Notwithstanding above naming restriction, you can use most character strings as an identifier by enclosing in Grave Accents(U+0060 \` ) or Quotation Marks(U+0022 `"`) if [--ansi-quotes]({{ '/reference/command.html#options' | relative_url }}) is specified.
Enclosure characters are escaped by back slashes or double enclosures.
Enclosure characters are escaped by backslashes or double enclosures.

Identifiers represent tables, columns, functions or cursors.
Character case is insensitive except file paths, and whether file paths are case insensitive or not depends on your file system.
Character case is insensitive except file paths, and whether file paths are case-insensitive or not depends on your file system.

String
: A string is a character string enclosed in Apostrophes(U+0027 `'`) or Quotation Marks(U+0022 `"`) if [--ansi-quotes]({{ '/reference/command.html#options' | relative_url }}) is not specified.
In a string, enclosure characters are escaped by back slashes or double enclosures.
In a string, enclosure characters are escaped by backslashes or double enclosures.

Integer
: An integer is a word that contains only \[0-9\].
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2006-01-02-system-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ _argument_
_return_
: [string]({{ '/reference/value.html#string' | relative_url }})

Execute a external _command_ and returns the standard output as a string.
Execute an external _command_ and returns the standard output as a string.
If the external command failed, then the executing procedure is terminated with an error.
12 changes: 6 additions & 6 deletions docs/_posts/2006-01-02-transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: reference
# Transaction Management

A transaction is a single logical unit of work.
A transaction is a atomic unit, so you get the result of either all of the changes are performed or none of them is performed.
A transaction is an atomic unit, so you get the result of either all the changes are performed or none of them is performed.

* [Usage Flow in a Procedure](#usage_flow_in_prodecure)
* [Usage Flow in the Interactive Shell](#usage_flow_in_shell)
Expand All @@ -26,9 +26,9 @@ A transaction is started automatically when the procedure execution is started,

A transaction is terminated when a commit or rollback statement is executed.

When the procedure is normally terminated, then commit all of the changes automatically.
When the procedure is normally terminated, then commit all the changes automatically.

When some errors occurred in the procedure, then roll all of the changes back automatically.
When some errors occurred in the procedure, then roll all the changes back automatically.

When the procedure is exited by [EXIT statement]({{ '/reference/control-flow.html#exit' | relative_url }}), then roll all of the changes back automatically.

Expand All @@ -43,7 +43,7 @@ A transaction is started automatically when the interactive shell is launched, o

A transaction is terminated when a commit or rollback statement is executed.

When the interactive shell is terminated, then roll all of the changes back automatically.
When the interactive shell is terminated, then roll all the changes back automatically.


## File Locking
Expand Down Expand Up @@ -75,7 +75,7 @@ In that case, you must manually remove following hidden files created by csvq.
## Commit Statement
{: #commit}

A commit statement writes all of the changes to files.
A commit statement writes all the changes to files.

```sql
COMMIT;
Expand All @@ -84,7 +84,7 @@ COMMIT;
## Rollback Statement
{: #rollback}

A rollback statement discards all of the changes.
A rollback statement discards all the changes.

```sql
ROLLBACK;
Expand Down
Loading

0 comments on commit ceb66bf

Please sign in to comment.