1

在 esqueleto 上编译我的代码时遇到问题。出于某种原因,我的 fpcomplete IDE 说现在有一个错误。但是,当我构建它时,它说 My ModelId 是未知的。

这是我的代码:

qryStrainsList ::  SqlBackend -> IO [RawWeedsInfo]
qryStrainsList backend = (flip runReaderT) backend
    $ select 
    $ from $ \(strains `LeftOuterJoin` strainsInfo) -> do
         on $ (strains ^. StrainsId) ==.  strainsInfo ^. StrainsAdditionalInformationStrainId
         return ( strains   ^. StrainsId
            , strains   ^. StrainsName
            , strains ^. StrainsStrainType
            , strains ^. StrainsDescription
            , strainsInfo ^. StrainsAdditionalInformationIncludeType
            , strainsInfo ^. StrainsAdditionalInformationExcludeType
            , strainsInfo ^. StrainsAdditionalInformationSymptoms
            , strainsInfo ^. StrainsAdditionalInformationConditions
            , strains ^. StrainsFlavor
            , strains ^. StrainsThcLevel
            , strains ^. StrainsCbdLevel
            , strains ^. StrainsPhotoPeriod
            , strains ^. StrainsBreeders
      )

错误信息是这样的:

The code threw an exception : 
IOException: user error (Postgresql.withStmt': 
    bad result status FatalError (
    ("PGRES_FATAL_ERROR","ERROR:  
           zero-length delimited identifier at or near \"\"\"\"\nLINE 
    1: SELECT \"strains\".\"\", \"strains\".\"name\", \"strains\".\"strain_typ...\n                         ^\n")))

也许这也会有所帮助:我使用 FpComplete 作为 Esqueleto 2.0.1 的 IDE(我认为这是 IDE 支持的版本。)

谢谢。

4

0 回答 0