diff --git a/src/ControlFileBuilder.php b/src/ControlFileBuilder.php index 0b9395c..980ad46 100644 --- a/src/ControlFileBuilder.php +++ b/src/ControlFileBuilder.php @@ -94,12 +94,8 @@ public function inserts(): string $inserts .= "FIELDS TERMINATED BY '{$table->terminatedBy}' "; } - if ($table->optionally) { - $inserts .= 'OPTIONALLY '; - } - if ($table->enclosedBy) { - $inserts .= "ENCLOSED BY '{$table->enclosedBy}'".PHP_EOL; + $inserts .= "OPTIONALLY ENCLOSED BY '{$table->enclosedBy}'".PHP_EOL; } if ($table->trailing) { diff --git a/src/SQLLoader.php b/src/SQLLoader.php index 2c62582..f3d2dac 100644 --- a/src/SQLLoader.php +++ b/src/SQLLoader.php @@ -72,11 +72,10 @@ public function into( string $table, array $columns, ?string $terminatedBy = ',', - bool $optionally = true, ?string $enclosedBy = '"', ?string $trailing = null ): static { - $this->tables[] = new TableDefinition($table, $columns, $terminatedBy, $optionally, $enclosedBy, $trailing); + $this->tables[] = new TableDefinition($table, $columns, $terminatedBy, $enclosedBy, $trailing); return $this; } diff --git a/src/TableDefinition.php b/src/TableDefinition.php index 762635e..014dfa0 100644 --- a/src/TableDefinition.php +++ b/src/TableDefinition.php @@ -10,7 +10,6 @@ public function __construct( public string $table, public array $columns, public ?string $terminatedBy = null, - public ?bool $optionally = null, public ?string $enclosedBy = null, public ?string $trailing = null ) {