Skip to content

Commit

Permalink
backend : added kvDbflow in dsl
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaygupta18 committed May 16, 2024
1 parent 7ca566f commit 99d3378
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/namma-dsl/src/NammaDSL/Generator/Haskell/BeamQueries.hs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ generateDefaultCreateQuery storageRead = do
let name = tableNameHaskell tableDef
let withIdFields = getAllFieldsWithIdRelation (fields tableDef)
let dName = domainTypeModulePrefix ++ name ++ "." ++ name
let fungSign = maybe ([_EsqDBFlow, _MonadFlow, _CacheFlow] <> [_HasSchemaName name | isHasSchemaNameRequired' ]) (pure . vT) tableDef.defaultQueryTypeConstraint
let fungSign = maybe ([_KvDbFlow] <> [_HasSchemaName name | isHasSchemaNameRequired' ]) (pure . vT) tableDef.defaultQueryTypeConstraint
TH.decsW $ do
TH.sigDW "create" $ do
TH.forallT [] fungSign $
Expand Down Expand Up @@ -271,6 +271,9 @@ generateDefaultCreateQuery storageRead = do
_EsqDBFlow :: Q TH.Type
_EsqDBFlow = cT "EsqDBFlow" ~~ vT "m" ~~ vT "r"

_KvDbFlow :: Q TH.Type
_KvDbFlow = cT "KvDbFlow" ~~ vT "m" ~~ vT "r"

_MonadFlow :: Q TH.Type
_MonadFlow = cT "MonadFlow" ~~ vT "m"

Expand Down
2 changes: 1 addition & 1 deletion lib/namma-dsl/tests/dsl-config.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ let defaultImports =
[ "Kernel.Beam.Functions"
, "Kernel.Prelude"
, "Kernel.External.Encryption"
, "Kernel.Utils.Common (MonadFlow, CacheFlow, EsqDBFlow, getCurrentTime, fromMaybeM)"
, "Kernel.Utils.Common (MonadFlow, CacheFlow, KvDbFlow, EsqDBFlow, getCurrentTime, fromMaybeM)"
, "Kernel.Types.Error"
]
, _qualifiedImports = [ "Sequelize as Se" ]
Expand Down

0 comments on commit 99d3378

Please sign in to comment.