mirror of
https://github.com/Airsequel/AirGQL.git
synced 2025-08-13 10:16:57 +03:00
Remove commented out code from graphiql playground component
Also make it so `_by_pk` is only disallowed as a table suffix, not infix
This commit is contained in:
parent
768b711a6f
commit
9088c8fd05
1 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ import Control.Monad.Catch (catchAll)
|
|||
import Data.Aeson (FromJSON, ToJSON, Value (Bool, Null, Number, Object, String))
|
||||
import Data.Aeson.KeyMap qualified as KeyMap
|
||||
import Data.Scientific qualified as Scientific
|
||||
import Data.Text (isInfixOf, toUpper)
|
||||
import Data.Text (isInfixOf, isSuffixOf, toUpper)
|
||||
import Data.Text qualified as T
|
||||
import Database.SQLite.Simple (
|
||||
Connection,
|
||||
|
@ -737,7 +737,7 @@ lintTable allEntries parsed =
|
|||
illegalName = case parsed.statement of
|
||||
CreateTable names _ _
|
||||
| Just name <- getFirstName (Just names)
|
||||
, "_by_pk" `isInfixOf` name ->
|
||||
, "_by_pk" `isSuffixOf` name ->
|
||||
pure $
|
||||
"Table names shouldn't contain \"_by_pk\", yet \""
|
||||
<> name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue