修复bug

This commit is contained in:
LIm1tZz7 committed 2026-10-11 17:32:12 +08:00
1 parent fc9bbc20e4
commit e87c4ee6a8
90 files changed
+3828 -452

No files matched your search

+4
View File
@@ -10,6 +10,7 @@ module ChuSQL.CLI.Script
, metaHelp
) where
import ChuSQL.CLI.Normalization (normalizationArguments)
import ChuSQL.CLI.Format (OutputFormat (..), formatName, parseFormat)
import Data.Char (isSpace)
import Data.Text (Text)
@@ -23,6 +24,7 @@ data Meta
| MetaDatabases
| MetaTables
| MetaDescribe Text
| MetaNormalize Text FilePath Bool
| MetaRoles
| MetaConnect Text
| MetaSetFormat OutputFormat
@@ -50,6 +52,7 @@ parseMeta raw = do
| otherwise -> MetaDescribe argument
"dr" -> MetaRoles
"roles" -> MetaRoles
"normalize" -> either (const (MetaUnknown "normalize")) (\(table, file, jsonOutput) -> MetaNormalize table file jsonOutput) (normalizationArguments argument)
"c" -> connectTo argument
"connect" -> connectTo argument
"use" -> connectTo argument
@@ -118,6 +121,7 @@ metaHelp =
, " \\l, \\list list databases"
, " \\dt, \\d list tables"
, " \\d <table> describe a table"
, " \\normalize TABLE --declaration FILE [--format text|json]"
, " \\dr, \\roles list roles with their grants and members"
, " \\c <database> switch database"
, " \\f, \\format <fmt> output format: " <> T.intercalate ", " (map formatName [FormatTable, FormatJson, FormatCsv])