From f9a9652726012a6084c2e77a25ea0fe718e69dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sat, 30 Sep 2023 20:21:10 +0800 Subject: [PATCH] eee --- ImplodeCommand.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ImplodeCommand.php b/ImplodeCommand.php index 745f8db..918c405 100644 --- a/ImplodeCommand.php +++ b/ImplodeCommand.php @@ -39,10 +39,12 @@ class ImplodeCommand extends Command /** - * @var Channel + * @var Channel */ protected Channel $channel; + protected array $data; + /** * @@ -54,6 +56,8 @@ class ImplodeCommand extends Command ->addArgument('path', InputArgument::REQUIRED, "save to path", null) ->addOption('database', 'db', InputArgument::OPTIONAL) ->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(); $insert = str_replace(''', "\'", str_replace('"', '"', $line)); + + $insert = strtr($insert, $this->data); Coroutine::create(function () use ($waite, $insert, $data) { Coroutine\defer(fn() => $waite->done()); $data->createCommand($insert)->exec();