home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / qrycodes.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  10KB  |  283 lines

  1. // *************************************************************************
  2. //
  3. //  File: QRYCODES.H
  4. //
  5. //  Copyright (c) 1994, 1995 Microsoft Corp.
  6. //
  7. //
  8. //
  9. //  This file contains the Query operator manifests for queries against
  10. //  machines. This is part of the SMS SDK.
  11. //
  12. //
  13. //  History:
  14. //      JonShu      01-April-1994       Created.
  15. //                                      This was extracted from query.h
  16. //
  17. // *************************************************************************
  18.  
  19. #ifndef _QUERYCODES_H_
  20. #define _QUERYCODES_H_
  21.  
  22. // Query Operators.
  23. // ================
  24.  
  25. #define QOP_NOOP                0
  26.  
  27. #define QOP_BOOL_EQ             1
  28. #define QOP_BOOL_NEQ            2
  29. #define QOP_BOOL_FIRST          QOP_BOOL_EQ
  30. #define QOP_BOOL_LAST           QOP_BOOL_NEQ
  31.  
  32. #define QOP_NUMERIC_EQ          3
  33. #define QOP_NUMERIC_NEQ         4
  34. #define QOP_NUMERIC_GT          5
  35. #define QOP_NUMERIC_LT          6
  36. #define QOP_NUMERIC_GTE         7
  37. #define QOP_NUMERIC_LTE         8
  38. #define QOP_NUMERIC_FIRST       QOP_NUMERIC_EQ
  39. #define QOP_NUMERIC_LAST        QOP_NUMERIC_LTE
  40.  
  41. #define QOP_STR_EQ              9
  42. #define QOP_STR_NEQ             10
  43. #define QOP_STR_GT              11
  44. #define QOP_STR_LT              12
  45. #define QOP_STR_GTE             13
  46. #define QOP_STR_LTE             14
  47. #define QOP_STR_LIKE            15
  48. #define QOP_STR_NOTLIKE         16
  49. #define QOP_STR_FIRST           QOP_STR_EQ
  50. #define QOP_STR_LAST            QOP_STR_NOTLIKE
  51.  
  52. #define QOP_UPCASE_EQ           17
  53. #define QOP_UPCASE_NEQ          18
  54. #define QOP_UPCASE_GT           19
  55. #define QOP_UPCASE_LT           20
  56. #define QOP_UPCASE_GTE          21
  57. #define QOP_UPCASE_LTE          22
  58. #define QOP_UPCASE_LIKE         23
  59. #define QOP_UPCASE_NOTLIKE      24
  60. #define QOP_UPCASE_FIRST        QOP_UPCASE_EQ
  61. #define QOP_UPCASE_LAST         QOP_UPCASE_NOTLIKE
  62.  
  63. #define QOP_DATETIME_EQ         25
  64. #define QOP_DATETIME_NEQ        26
  65. #define QOP_DATETIME_GT         27
  66. #define QOP_DATETIME_LT         28
  67. #define QOP_DATETIME_GTE        29
  68. #define QOP_DATETIME_LTE        30
  69. #define QOP_DATETIME_FIRST      QOP_DATETIME_EQ
  70. #define QOP_DATETIME_LAST       QOP_DATETIME_LTE
  71.  
  72. #define QOP_DATE_EQ             31
  73. #define QOP_DATE_NEQ            32
  74. #define QOP_DATE_GT             33
  75. #define QOP_DATE_LT             34
  76. #define QOP_DATE_GTE            35
  77. #define QOP_DATE_LTE            36
  78. #define QOP_DATE_FIRST          QOP_DATE_EQ
  79. #define QOP_DATE_LAST           QOP_DATE_LTE
  80.  
  81. #define QOP_TIME_EQ             37
  82. #define QOP_TIME_NEQ            38
  83. #define QOP_TIME_GT             39
  84. #define QOP_TIME_LT             40
  85. #define QOP_TIME_GTE            41
  86. #define QOP_TIME_LTE            42
  87. #define QOP_TIME_FIRST          QOP_TIME_EQ
  88. #define QOP_TIME_LAST           QOP_TIME_LTE
  89.  
  90. #define QOP_YEAR_EQ             43
  91. #define QOP_YEAR_NEQ            44
  92. #define QOP_YEAR_GT             45
  93. #define QOP_YEAR_LT             46
  94. #define QOP_YEAR_GTE            47
  95. #define QOP_YEAR_LTE            48
  96. #define QOP_YEAR_FIRST          QOP_YEAR_EQ
  97. #define QOP_YEAR_LAST           QOP_YEAR_LTE
  98.  
  99. #define QOP_MONTH_EQ            49
  100. #define QOP_MONTH_NEQ           50
  101. #define QOP_MONTH_GT            51
  102. #define QOP_MONTH_LT            52
  103. #define QOP_MONTH_GTE           53
  104. #define QOP_MONTH_LTE           54
  105. #define QOP_MONTH_FIRST         QOP_MONTH_EQ
  106. #define QOP_MONTH_LAST          QOP_MONTH_LTE
  107.  
  108. #define QOP_DAY_EQ              55
  109. #define QOP_DAY_NEQ             56
  110. #define QOP_DAY_GT              57
  111. #define QOP_DAY_LT              58
  112. #define QOP_DAY_GTE             59
  113. #define QOP_DAY_LTE             60
  114. #define QOP_DAY_FIRST           QOP_DAY_EQ
  115. #define QOP_DAY_LAST            QOP_DAY_LTE
  116.  
  117. #define QOP_HOUR_EQ             61
  118. #define QOP_HOUR_NEQ            62
  119. #define QOP_HOUR_GT             63
  120. #define QOP_HOUR_LT             64
  121. #define QOP_HOUR_GTE            65
  122. #define QOP_HOUR_LTE            66
  123. #define QOP_HOUR_FIRST          QOP_HOUR_EQ
  124. #define QOP_HOUR_LAST           QOP_HOUR_LTE
  125.  
  126. #define QOP_MINUTE_EQ           67
  127. #define QOP_MINUTE_NEQ          68
  128. #define QOP_MINUTE_GT           69
  129. #define QOP_MINUTE_LT           70
  130. #define QOP_MINUTE_GTE          71
  131. #define QOP_MINUTE_LTE          72
  132. #define QOP_MINUTE_FIRST        QOP_MINUTE_EQ
  133. #define QOP_MINUTE_LAST         QOP_MINUTE_LTE
  134.  
  135. #define QOP_SECOND_EQ           73
  136. #define QOP_SECOND_NEQ          74
  137. #define QOP_SECOND_GT           75
  138. #define QOP_SECOND_LT           76
  139. #define QOP_SECOND_GTE          77
  140. #define QOP_SECOND_LTE          78
  141. #define QOP_SECOND_FIRST        QOP_SECOND_EQ
  142. #define QOP_SECOND_LAST         QOP_SECOND_LTE
  143.  
  144. #define QOP_LAST                QOP_SECOND_LAST
  145.  
  146.  
  147. //***************************************************************************
  148. // OPERATOR STRING TABLE.
  149. //
  150. // The sequence of the operators in this array is identical to the
  151. // sequence of of the QOP_ symbols in QUERYTOK.H.  If the order of one
  152. // is changed, the order of the other must be changed to match.
  153. // Eventually, this table will be replaced with a string table resource
  154. // of some kind.   See CQueryToken::OperatorToString().
  155. //
  156. //***************************************************************************
  157. static char *OpName[] = {
  158.     /* QOP_NOOP */              "<none>",
  159.  
  160.     /* BOOL operators */
  161.  
  162.     /* QOP_BOOL_EQ,  */         "is (boolean)",
  163.     /* QOP_BOOL_NEQ, */         "is not (boolean)",
  164.  
  165.     /* NUMERIC operators */
  166.  
  167.     /* QOP_NUMERIC_EQ,  */      "is equal to",
  168.     /* QOP_NUMERIC_NEQ, */      "is not equal to",
  169.     /* QOP_NUMERIC_GT,  */      "is greater than",
  170.     /* QOP_NUMERIC_LT,  */      "is less than",
  171.     /* QOP_NUMERIC_GTE, */      "is greater than or equal to",
  172.     /* QOP_NUMERIC_LTE, */      "is less than or equal to",
  173.  
  174.     /* Case-sensitive string operators */
  175.  
  176.     /* QOP_STR_EQ      */       "is",
  177.     /* QOP_STR_NEQ     */       "is not",
  178.     /* QOP_STR_GT      */       "comes after",
  179.     /* QOP_STR_LT      */       "comes before",
  180.     /* QOP_STR_GTE     */       "is same as or comes after",
  181.     /* QOP_STR_LTE     */       "is same as or comes before",
  182.     /* QOP_STR_LIKE    */       "is like",
  183.     /* QOP_STR_NOTLIKE */       "is not like",
  184.  
  185.     /* Upper-case-evaluation string operators */
  186.  
  187.     /* QOP_UPCASE_EQ,     */    "is (upper case)",
  188.     /* QOP_UPCASE_NEQ,    */    "is not (upper case)",
  189.     /* QOP_UPCASE_GT,     */    "comes after (upper case)",
  190.     /* QOP_UPCASE_LT,     */    "comes before (upper case)",
  191.     /* QOP_UPCASE_GTE,    */    "is same as or comes after (upper case)",
  192.     /* QOP_UPCASE_LTE,    */    "is same as or comes before (upper case)",
  193.     /* QOP_UPCASE_LIKE,   */    "is like (upper case)",
  194.     /* QOP_UPCASE_NOTLIKE */    "is not like (upper case)",
  195.  
  196.     /* Date-Time operators */
  197.  
  198.     /* QOP_DATETIME_EQ,  */     "date/time is",
  199.     /* QOP_DATETIME_NEQ, */     "date/time is not",
  200.     /* QOP_DATETIME_GT,  */     "date/time is after",
  201.     /* QOP_DATETIME_LT,  */     "date/time is before",
  202.     /* QOP_DATETIME_GTE, */     "date/time is on or after",
  203.     /* QOP_DATETIME_LTE, */     "date/time is on or before",
  204.  
  205.     /* Date operators */
  206.  
  207.     /* QOP_DATE_EQ,  */         "date is",
  208.     /* QOP_DATE_NEQ, */         "date is not",
  209.     /* QOP_DATE_GT,  */         "date is after",
  210.     /* QOP_DATE_LT,  */         "date is before",
  211.     /* QOP_DATE_GTE, */         "date is on or after",
  212.     /* QOP_DATE_LTE, */         "date is on or before",
  213.  
  214.     /* Time operators */
  215.  
  216.     /* QOP_TIME_EQ,  */         "time is",
  217.     /* QOP_TIME_NEQ, */         "time is not",
  218.     /* QOP_TIME_GT,  */         "time is after",
  219.     /* QOP_TIME_LT,  */         "time is before",
  220.     /* QOP_TIME_GTE, */         "time is at or after",
  221.     /* QOP_TIME_LTE, */         "time is at or before",
  222.  
  223.     /* Year operators */
  224.  
  225.     /* QOP_YEAR_EQ,  */         "year is",
  226.     /* QOP_YEAR_NEQ, */         "year is not",
  227.     /* QOP_YEAR_GT,  */         "year is after",
  228.     /* QOP_YEAR_LT,  */         "year is before",
  229.     /* QOP_YEAR_GTE, */         "year is on or after",
  230.     /* QOP_YEAR_LTE, */         "year is on or before",
  231.  
  232.     /* Month operators */
  233.  
  234.     /* QOP_MONTH_EQ  */         "month is",
  235.     /* QOP_MONTH_NEQ */         "month is not",
  236.     /* QOP_MONTH_GT  */         "month is after",
  237.     /* QOP_MONTH_LT  */         "month is before",
  238.     /* QOP_MONTH_GTE */         "month is on or after",
  239.     /* QOP_MONTH_LTE */         "month is on or before",
  240.  
  241.     /* Day operators */
  242.  
  243.     /* QOP_DAY_EQ,  */          "day is",
  244.     /* QOP_DAY_NEQ, */          "day is not",
  245.     /* QOP_DAY_GT,  */          "day is after",
  246.     /* QOP_DAY_LT,  */          "day is before",
  247.     /* QOP_DAY_GTE, */          "day is on or after",
  248.     /* QOP_DAY_LTE, */          "day is on or before",
  249.  
  250.     /* Hour operators */
  251.  
  252.     /* QOP_HOUR_EQ,  */         "hour is",
  253.     /* QOP_HOUR_NEQ, */         "hour is not",
  254.     /* QOP_HOUR_GT,  */         "hour is after",
  255.     /* QOP_HOUR_LT,  */         "hour is before",
  256.     /* QOP_HOUR_GTE, */         "hour is at or after",
  257.     /* QOP_HOUR_LTE, */         "hour is at or before",
  258.  
  259.     /* Minute operators */
  260.  
  261.     /* QOP_MINUTE_EQ,  */       "minute is",
  262.     /* QOP_MINUTE_NEQ, */       "minute is not",
  263.     /* QOP_MINUTE_GT,  */       "minute is after",
  264.     /* QOP_MINUTE_LT,  */       "minute is before",
  265.     /* QOP_MINUTE_GTE, */       "minute is at or after",
  266.     /* QOP_MINUTE_LTE, */       "minute is at or before",
  267.  
  268.     /* Second operators */
  269.  
  270.     /* QOP_SECOND_EQ,  */       "second is",
  271.     /* QOP_SECOND_NEQ, */       "second is not",
  272.     /* QOP_SECOND_GT,  */       "second is after",
  273.     /* QOP_SECOND_LT,  */       "second is before",
  274.     /* QOP_SECOND_GTE, */       "second is at or after",
  275.     /* QOP_SECOND_LTE, */       "second is at or before"
  276. };
  277.  
  278. #endif  // _QUERYCODES_H_
  279.  
  280.  
  281. /* EOF: qrycodes.h */
  282.  
  283.