1 /*-------------------------------------------------------------------------
4 * POSTGRES scan direction definitions.
7 * Copyright (c) 1994, Regents of the University of California
9 * $Id: sdir.h,v 1.6 1999/05/25 16:13:34 momjian Exp $
11 *-------------------------------------------------------------------------
18 * ScanDirection was an int8 for no apparent reason. I kept the original
19 * values because I'm not sure if I'll break anything otherwise. -ay 2/95
21 typedef enum ScanDirection
23 BackwardScanDirection = -1,
24 NoMovementScanDirection = 0,
25 ForwardScanDirection = 1
29 * ScanDirectionIsValid
30 * True iff scan direction is valid.
32 #define ScanDirectionIsValid(direction) \
33 ((bool) (BackwardScanDirection <= direction && \
34 direction <= ForwardScanDirection))
37 * ScanDirectionIsBackward
38 * True iff scan direction is backward.
40 #define ScanDirectionIsBackward(direction) \
41 ((bool) (direction == BackwardScanDirection))
44 * ScanDirectionIsNoMovement
45 * True iff scan direction indicates no movement.
47 #define ScanDirectionIsNoMovement(direction) \
48 ((bool) (direction == NoMovementScanDirection))
51 * ScanDirectionIsForward
52 * True iff scan direction is forward.
54 #define ScanDirectionIsForward(direction) \
55 ((bool) (direction == ForwardScanDirection))