documentation建议设置:
configuration.load.writeDisposition
至WRITE_TRUNCATE
。
但是,在尝试为此设置选项时,无效。以下数组包含我尝试过的所有选项:
$options = [
'configuration.load.writeDisposition' => 'WRITE_TRUNCATE',
'configuration.writeDisposition' => 'WRITE_TRUNCATE',
'writeDisposition' => 'WRITE_TRUNCATE',
'configuration' => [
'writeDisposition' => 'WRITE_TRUNCATE',
'load' => [
'writeDisposition' => 'WRITE_TRUNCATE',
],
],
];
$table->load($data, $options);
我单独添加了每个选项,每次查看表格的大小时都会进行观察。
答案 0 :(得分:1)
提交了修复问题的pull request后,我现在可以确认定义此选项的正确方法如下:
$options = [
'configuration' => [
'load' => ['writeDisposition' => 'WRITE_TRUNCATE']
],
];