github.com/mithrandie/csvq@v1.18.1/docs/_posts/2006-01-02-flag.md (about)

     1  ---
     2  layout: default
     3  title: Flag - Reference Manual - csvq
     4  category: reference
     5  ---
     6  
     7  # Flag
     8  
     9  A flag is a representation of a [command option]({{ '/reference/command.html#options' | relative_url }}). 
    10  
    11  ## Flags
    12  
    13  | name                        | type    | description                                                                    |
    14  |:----------------------------|:--------|:-------------------------------------------------------------------------------|
    15  | @@REPOSITORY                | string  | Directory path where files are located                                         |
    16  | @@TIMEZONE                  | string  | Default TimeZone                                                               |
    17  | @@DATETIME_FORMAT           | string  | Datetime Format to parse strings                                               |
    18  | @@ANSI_QUOTES               | boolean | Use double quotation mark as identifier enclosure                              |
    19  | @@STRICT_EQUAL              | boolean | Compare strictly that two values are equal for DISTINCT, GROUP BY and ORDER BY |
    20  | @@WAIT_TIMEOUT              | float   | Limit of the waiting time in seconds to wait for locked files to be released   |
    21  | @@IMPORT_FORMAT             | string  | Default format to load files                                                   |
    22  | @@DELIMITER                 | string  | Field delimiter for CSV                                                        |
    23  | @@ALLOW_UNEVEN_FIELDS       | boolean | Allow loading CSV files with uneven field length                               |
    24  | @@DELIMITER_POSITIONS       | string  | Delimiter positions for Fixed-Length Format                                    |
    25  | @@JSON_QUERY                | string  | Query for JSON data                                                            |
    26  | @@ENCODING                  | string  | Character encoding                                                             |
    27  | @@NO_HEADER                 | boolean | Import first line as a record                                                  |
    28  | @@WITHOUT_NULL              | boolean | Parse empty fields as empty strings                                            |
    29  | @@STRIP_ENDING_LINE_BREAK   | boolean | Strip line break from the end of files and query results                       |
    30  | @@FORMAT                    | string  | Format of query results                                                        |
    31  | @@WRITE_ENCODING            | string  | Character encoding of query results                                            |
    32  | @@WRITE_DELIMITER           | string  | Field delimiter for query results in CSV                                       |
    33  | @@WRITE_DELIMITER_POSITIONS | string  | Delimiter positions for query results in Fixed-Length Format                   |
    34  | @@WITHOUT_HEADER            | boolean | Write without the header line in query results                                 |
    35  | @@LINE_BREAK                | string  | Line Break in query results                                                    |
    36  | @@ENCLOSE_ALL               | boolean | Enclose all string values in CSV                                               |
    37  | @@JSON_ESCAPE               | string  | JSON escape type of query results                                              |
    38  | @@PRETTY_PRINT              | boolean | Make JSON output easier to read in query results                               |
    39  | @@SCIENTIFIC_NOTATION       | boolean | Use Scientific Notation for large exponents in output                          |
    40  | @@EAST_ASIAN_ENCODING       | boolean | Count ambiguous characters as fullwidth                                        |
    41  | @@COUNT_DIACRITICAL_SIGN    | boolean | Count diacritical signs as halfwidth                                           |
    42  | @@COUNT_FORMAT_CODE         | boolean | Count format characters and zero-width spaces as halfwidth                     |
    43  | @@COLOR                     | boolean | Use ANSI color escape sequences                                                |
    44  | @@QUIET                     | boolean | Suppress operation log output                                                  |
    45  | @@LIMIT_RECURSION           | integer | Maximum number of iterations for recursive queries                             |
    46  | @@CPU                       | integer | Hint for the number of cpu cores to be used                                    |
    47  | @@STATS                     | boolean | Show execution time                                                            |
    48  
    49  
    50  ### SET FLAG
    51  
    52  ```sql
    53  SET @@flag_name TO value;
    54  SET @@flag_name = value;
    55  ```
    56  
    57  _value_
    58  : [value]({{ '/reference/value.html' | relative_url }}) or [identifier]({{ '/reference/statement.html#parsing' | relative_url }})
    59  
    60  A Set Flag statement is used to overwrite the flag value passed by using the command option. 
    61  
    62  > @@DATETIME_FORMAT flag is appended to the current formats, not overwritten. 
    63  
    64  
    65  ### SHOW FLAG
    66  
    67  ```sql
    68  SHOW @@flag_name;
    69  ```
    70  
    71  A Show Flag statement outputs the flag value. 
    72  
    73  
    74  ### ADD FLAG ELEMENT
    75  
    76  ```sql
    77  ADD value TO @@DATETIME_FORMAT;
    78  ```
    79  
    80  _value_
    81  : [string]({{ '/reference/value.html#string' | relative_url }})
    82  
    83  An Add Flag Element statement is used to add datetime formats to _@@DATETIME_FORMAT_.
    84  
    85  You can use JSON array of strings to set multiple format at once.
    86  
    87  
    88  ### REMOVE FLAG ELEMENT
    89  
    90  ```sql
    91  REMOVE value FROM @@DATETIME_FORMAT;
    92  ```
    93  
    94  _value_
    95  : [string]({{ '/reference/value.html#string' | relative_url }}) or [integer]({{ '/reference/value.html#integer' | relative_url }})
    96  
    97  A Remove Flag Element statement is used to remove a format from _@@DATETIME_FORMAT_.
    98  
    99  If _value_ is a string, then the same element in the _@@DATETIME_FORMAT_ is removed.
   100  If _value_ is an integer, then an element existing at the index number is removed.