eee
This commit is contained in:
@@ -43,6 +43,8 @@ class ImplodeCommand extends Command
|
|||||||
*/
|
*/
|
||||||
protected Channel $channel;
|
protected Channel $channel;
|
||||||
|
|
||||||
|
protected array $data;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -54,6 +56,8 @@ class ImplodeCommand extends Command
|
|||||||
->addArgument('path', InputArgument::REQUIRED, "save to path", null)
|
->addArgument('path', InputArgument::REQUIRED, "save to path", null)
|
||||||
->addOption('database', 'db', InputArgument::OPTIONAL)
|
->addOption('database', 'db', InputArgument::OPTIONAL)
|
||||||
->setDescription('php kiri.php db:implode --database users /Users/admin/snowflake-bi/test.sql');
|
->setDescription('php kiri.php db:implode --database users /Users/admin/snowflake-bi/test.sql');
|
||||||
|
|
||||||
|
$this->data = array_flip(get_html_translation_table());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -83,6 +87,8 @@ class ImplodeCommand extends Command
|
|||||||
}
|
}
|
||||||
$waite->add();
|
$waite->add();
|
||||||
$insert = str_replace(''', "\'", str_replace('"', '"', $line));
|
$insert = str_replace(''', "\'", str_replace('"', '"', $line));
|
||||||
|
|
||||||
|
$insert = strtr($insert, $this->data);
|
||||||
Coroutine::create(function () use ($waite, $insert, $data) {
|
Coroutine::create(function () use ($waite, $insert, $data) {
|
||||||
Coroutine\defer(fn() => $waite->done());
|
Coroutine\defer(fn() => $waite->done());
|
||||||
$data->createCommand($insert)->exec();
|
$data->createCommand($insert)->exec();
|
||||||
|
|||||||
Reference in New Issue
Block a user