nri-observability-0.1.1.1: Report log spans collected by nri-prelude.
Safe HaskellNone
LanguageHaskell2010

Log.SqlQuery

Description

A module for creating great logs in code that makes SQL queries.

Synopsis

Documentation

data Details Source #

A type describing an SQL query.

emptyDetails
  { query = Just (Log.mkSecret "SELECT cuddles FROM puppies")
  , database = Just postgresql
  }

Instances

Instances details
Generic Details Source # 
Instance details

Defined in Log.SqlQuery

Associated Types

type Rep Details :: Type -> Type #

Methods

from :: Details -> Rep Details x #

to :: Rep Details x -> Details #

ToJSON Details Source # 
Instance details

Defined in Log.SqlQuery

TracingSpanDetails Details Source # 
Instance details

Defined in Log.SqlQuery

type Rep Details Source # 
Instance details

Defined in Log.SqlQuery

emptyDetails :: Details Source #

An empty details value to be modified by you.

query :: Details -> Maybe (Secret Text) Source #

The full query we're executing.

queryTemplate :: Details -> Maybe Text Source #

The query we're executing with values mocked out.

sqlOperation :: Details -> Maybe Text Source #

The SQL operation we're performing (SELECT INSERT DELETE / ...).

queriedRelation :: Details -> Maybe Text Source #

The primary relation of the query.

databaseType :: Details -> Maybe Text Source #

The type of database.

host :: Details -> Maybe Text Source #

Database host the connection is made to.

port :: Details -> Maybe Int Source #

Port the database is running on.

database :: Details -> Maybe Text Source #

The name of the database that is being queried.

rowsReturned :: Details -> Maybe Int Source #

The amount of rows this query returned.

mysql :: Text Source #

MySQL

postgresql :: Text Source #

Postgresql