Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0
    • Component/s: Documentation, Parser, Printer
    • Labels:
      None

      Description

      Requirement

      To use the CSV parser and printer for SQL Dumps it would be nice if they could handle null values.

      Specification

      To distinguish between an empty or null value empty values always gets quoted to denote an empty string. The absence of an quote denotes a null value

      Configuration

      To activate the behavior call the method withNullObjectPatternEnabled of the CSVFormat with parameter true.

      Modifications

      See attached patch.

      Example

      This example using as base the DEFAULT CSVFormat modified by the NullObjectPattern behavior.

      Array-Data CSV-Data
      {null,"","A"," "}; ,"A",""," "
      {"",null,"A"," "} "",,"A"," "
      {"","A",null} "","A",
      NULL in DBMS proprietary CSV formats
      Product Strategy Documentation / Link
      PostgreSQL If NULL should be preserved all non NULL values gets quoted PostgreSQL 8.1 Manual
      MySQL NULL Values will be replaced by the letters NULL or escaped by \n not found, verified with MySQL Workbench
      MS SQL NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null MSDN
      Oracle NULL Values will be replaced by the letters NULL Manual
      1. patch.txt
        16 kB
        Georg Tsakumagos
      2. CSV-93.diff
        11 kB
        Gary Gregory

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Georg Tsakumagos
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development