packages feed

sqlc-hs-0.2.0.0: test/golden/out/Pulse/Database/MarkAcknowledgedNotificationSent.hs

{- This file was auto-generated from queries.sql by sqlc-hs. -}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
module Pulse.Database.MarkAcknowledgedNotificationSent where

import Pulse.Database.Internal (Query(..), Enum, Params, Result)
import qualified Database.PostgreSQL.Simple
import qualified Database.PostgreSQL.Simple.FromRow
import qualified Database.PostgreSQL.Simple.ToField
import qualified Database.PostgreSQL.Simple.ToRow

import qualified Data.Int
import qualified Data.Foldable

query_markAcknowledgedNotificationSent :: Query "markAcknowledgedNotificationSent" ":exec"
query_markAcknowledgedNotificationSent = Query "UPDATE incident_escalations\nSET acknowledged_notification_sent_at = NOW(), updated_at = NOW()\nWHERE id = ?"

data instance Params "markAcknowledgedNotificationSent" = Params_markAcknowledgedNotificationSent
  {
    incident_escalations_id :: Data.Int.Int64
  }

data instance Result "markAcknowledgedNotificationSent" = Result_markAcknowledgedNotificationSent
  {
  }

instance Database.PostgreSQL.Simple.ToRow.ToRow (Params "markAcknowledgedNotificationSent") where
  toRow Params_markAcknowledgedNotificationSent{..} =
    [ 
      Database.PostgreSQL.Simple.ToField.toField incident_escalations_id
    ]

instance Database.PostgreSQL.Simple.FromRow.FromRow (Result "markAcknowledgedNotificationSent") where
  fromRow =
    pure Result_markAcknowledgedNotificationSent