mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
server: don't inline some text helper functions
Some of these `INLINE` pragmas might be counterproductive. https://github.com/hasura/graphql-engine-mono/pull/2199 GitOrigin-RevId: f5eeb21f646b4e5c18d7f3096a7eb7bc822950ae
This commit is contained in:
parent
fe8eabff19
commit
272e49a3c5
@ -7,7 +7,6 @@ module Data.Text.Extended
|
||||
, commaSeparated
|
||||
, paren
|
||||
, parenB
|
||||
, (<->)
|
||||
, (<~>)
|
||||
, (<>>)
|
||||
, (<<>)
|
||||
@ -53,49 +52,34 @@ instance ToTxt ODBC.Query where
|
||||
|
||||
bquote :: ToTxt t => t -> Text
|
||||
bquote t = DT.singleton '`' <> toTxt t <> DT.singleton '`'
|
||||
{-# INLINE bquote #-}
|
||||
|
||||
squote :: ToTxt t => t -> Text
|
||||
squote t = DT.singleton '\'' <> toTxt t <> DT.singleton '\''
|
||||
{-# INLINE squote #-}
|
||||
|
||||
dquote :: ToTxt t => t -> Text
|
||||
dquote t = DT.singleton '"' <> toTxt t <> DT.singleton '"'
|
||||
{-# INLINE dquote #-}
|
||||
|
||||
paren :: ToTxt t => t -> Text
|
||||
paren t = "(" <> toTxt t <> ")"
|
||||
{-# INLINE paren #-}
|
||||
|
||||
parenB :: TB.Builder -> TB.Builder
|
||||
parenB t = TB.char '(' <> t <> TB.char ')'
|
||||
{-# INLINE parenB #-}
|
||||
|
||||
dquoteList :: (ToTxt t, Foldable f) => f t -> Text
|
||||
dquoteList = DT.intercalate ", " . fmap dquote . toList
|
||||
{-# INLINE dquoteList #-}
|
||||
|
||||
commaSeparated :: (ToTxt t, Foldable f) => f t -> Text
|
||||
commaSeparated = DT.intercalate ", " . fmap toTxt . toList
|
||||
{-# INLINE commaSeparated #-}
|
||||
|
||||
|
||||
infixr 6 <->
|
||||
(<->) :: ToTxt t => t -> t -> Text
|
||||
(<->) l r = toTxt l <> DT.singleton ' ' <> toTxt r
|
||||
{-# INLINE (<->) #-}
|
||||
|
||||
infixr 6 <>>
|
||||
(<>>) :: ToTxt t => Text -> t -> Text
|
||||
(<>>) lTxt a = lTxt <> dquote a
|
||||
{-# INLINE (<>>) #-}
|
||||
|
||||
infixr 6 <<>
|
||||
(<<>) :: ToTxt t => t -> Text -> Text
|
||||
(<<>) a rTxt = dquote a <> rTxt
|
||||
{-# INLINE (<<>) #-}
|
||||
|
||||
infixr 6 <~>
|
||||
(<~>) :: TB.Builder -> TB.Builder -> TB.Builder
|
||||
(<~>) l r = l <> TB.char ' ' <> r
|
||||
{-# INLINE (<~>) #-}
|
||||
|
Loading…
Reference in New Issue
Block a user