0 | module Postgres.Data.ResultStatus
 1 |
 2 | ||| See the `ExecStatusType` from libpq for more information.
 3 | ||| constructors below are derived from libpq options by
 4 | ||| dropping the "PGRES_" prefix
 5 | public export 
 6 | data ResultStatus = EMPTY_QUERY
 7 |                   | COMMAND_OK
 8 |                   | TUPLES_OK
 9 |                   | COPY_OUT
10 |                   | COPY_IN
11 |                   | BAD_RESPONSE
12 |                   | NONFATAL_ERROR
13 |                   | FATAL_ERROR
14 |                   | COPY_BOTH
15 |                   | SINGLE_TUPLE
16 |                   | OTHER Int
17 |
18 | export
19 | Show ResultStatus where
20 |   show EMPTY_QUERY    = "EMPTY_QUERY"
21 |   show COMMAND_OK     = "COMMAND_OK"
22 |   show TUPLES_OK      = "TUPLES_OK"
23 |   show COPY_OUT       = "COPY_OUT"
24 |   show COPY_IN        = "COPY_IN"
25 |   show BAD_RESPONSE   = "BAD_RESPONSE"
26 |   show NONFATAL_ERROR = "NONFATAL_ERROR"
27 |   show FATAL_ERROR    = "FATAL_ERROR"
28 |   show COPY_BOTH      = "COPY_BOTH"
29 |   show SINGLE_TUPLE   = "SINGLE_TUPLE"
30 |   show (OTHER x)      = "OTHER " ++ (show x)
31 |