module Database.RethinkDB.Wire.Term where import Prelude (Maybe(..), Eq, Show) import Database.RethinkDB.Wire data TermType = DATUM | MAKE_ARRAY | MAKE_OBJ | VAR | JAVASCRIPT | UUID | HTTP | ERROR | IMPLICIT_VAR | DB | TABLE | GET | GET_ALL | EQ | NE | LT | LE | GT | GE | NOT | ADD | SUB | MUL | DIV | MOD | APPEND | PREPEND | DIFFERENCE | SET_INSERT | SET_INTERSECTION | SET_UNION | SET_DIFFERENCE | SLICE | SKIP | LIMIT | INDEXES_OF | CONTAINS | GET_FIELD | KEYS | OBJECT | HAS_FIELDS | WITH_FIELDS | PLUCK | WITHOUT | MERGE | BETWEEN | REDUCE | MAP | FILTER | CONCATMAP | ORDERBY | DISTINCT | COUNT | IS_EMPTY | UNION | NTH | BRACKET | INNER_JOIN | OUTER_JOIN | EQ_JOIN | ZIP | INSERT_AT | DELETE_AT | CHANGE_AT | SPLICE_AT | COERCE_TO | TYPEOF | UPDATE | DELETE | REPLACE | INSERT | DB_CREATE | DB_DROP | DB_LIST | TABLE_CREATE | TABLE_DROP | TABLE_LIST | SYNC | INDEX_CREATE | INDEX_DROP | INDEX_LIST | INDEX_STATUS | INDEX_WAIT | INDEX_RENAME | FUNCALL | BRANCH | ANY | ALL | FOREACH | FUNC | ASC | DESC | INFO | MATCH | UPCASE | DOWNCASE | SAMPLE | DEFAULT | JSON | ISO8601 | TO_ISO8601 | EPOCH_TIME | TO_EPOCH_TIME | NOW | IN_TIMEZONE | DURING | DATE | TIME_OF_DAY | TIMEZONE | YEAR | MONTH | DAY | DAY_OF_WEEK | DAY_OF_YEAR | HOURS | MINUTES | SECONDS | TIME | MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY | SUNDAY | JANUARY | FEBRUARY | MARCH | APRIL | MAY | JUNE | JULY | AUGUST | SEPTEMBER | OCTOBER | NOVEMBER | DECEMBER | LITERAL | GROUP | SUM | AVG | MIN | MAX | SPLIT | UNGROUP | RANDOM | CHANGES | ARGS | BINARY | GEOJSON | TO_GEOJSON | POINT | LINE | POLYGON | DISTANCE | INTERSECTS | INCLUDES | CIRCLE | GET_INTERSECTING | FILL | GET_NEAREST | POLYGON_SUB deriving (Eq, Show) instance WireValue TermType where toWire DATUM = 1 toWire MAKE_ARRAY = 2 toWire MAKE_OBJ = 3 toWire VAR = 10 toWire JAVASCRIPT = 11 toWire UUID = 169 toWire HTTP = 153 toWire ERROR = 12 toWire IMPLICIT_VAR = 13 toWire DB = 14 toWire TABLE = 15 toWire GET = 16 toWire GET_ALL = 78 toWire EQ = 17 toWire NE = 18 toWire LT = 19 toWire LE = 20 toWire GT = 21 toWire GE = 22 toWire NOT = 23 toWire ADD = 24 toWire SUB = 25 toWire MUL = 26 toWire DIV = 27 toWire MOD = 28 toWire APPEND = 29 toWire PREPEND = 80 toWire DIFFERENCE = 95 toWire SET_INSERT = 88 toWire SET_INTERSECTION = 89 toWire SET_UNION = 90 toWire SET_DIFFERENCE = 91 toWire SLICE = 30 toWire SKIP = 70 toWire LIMIT = 71 toWire INDEXES_OF = 87 toWire CONTAINS = 93 toWire GET_FIELD = 31 toWire KEYS = 94 toWire OBJECT = 143 toWire HAS_FIELDS = 32 toWire WITH_FIELDS = 96 toWire PLUCK = 33 toWire WITHOUT = 34 toWire MERGE = 35 toWire BETWEEN = 36 toWire REDUCE = 37 toWire MAP = 38 toWire FILTER = 39 toWire CONCATMAP = 40 toWire ORDERBY = 41 toWire DISTINCT = 42 toWire COUNT = 43 toWire IS_EMPTY = 86 toWire UNION = 44 toWire NTH = 45 toWire BRACKET = 170 toWire INNER_JOIN = 48 toWire OUTER_JOIN = 49 toWire EQ_JOIN = 50 toWire ZIP = 72 toWire INSERT_AT = 82 toWire DELETE_AT = 83 toWire CHANGE_AT = 84 toWire SPLICE_AT = 85 toWire COERCE_TO = 51 toWire TYPEOF = 52 toWire UPDATE = 53 toWire DELETE = 54 toWire REPLACE = 55 toWire INSERT = 56 toWire DB_CREATE = 57 toWire DB_DROP = 58 toWire DB_LIST = 59 toWire TABLE_CREATE = 60 toWire TABLE_DROP = 61 toWire TABLE_LIST = 62 toWire SYNC = 138 toWire INDEX_CREATE = 75 toWire INDEX_DROP = 76 toWire INDEX_LIST = 77 toWire INDEX_STATUS = 139 toWire INDEX_WAIT = 140 toWire INDEX_RENAME = 156 toWire FUNCALL = 64 toWire BRANCH = 65 toWire ANY = 66 toWire ALL = 67 toWire FOREACH = 68 toWire FUNC = 69 toWire ASC = 73 toWire DESC = 74 toWire INFO = 79 toWire MATCH = 97 toWire UPCASE = 141 toWire DOWNCASE = 142 toWire SAMPLE = 81 toWire DEFAULT = 92 toWire JSON = 98 toWire ISO8601 = 99 toWire TO_ISO8601 = 100 toWire EPOCH_TIME = 101 toWire TO_EPOCH_TIME = 102 toWire NOW = 103 toWire IN_TIMEZONE = 104 toWire DURING = 105 toWire DATE = 106 toWire TIME_OF_DAY = 126 toWire TIMEZONE = 127 toWire YEAR = 128 toWire MONTH = 129 toWire DAY = 130 toWire DAY_OF_WEEK = 131 toWire DAY_OF_YEAR = 132 toWire HOURS = 133 toWire MINUTES = 134 toWire SECONDS = 135 toWire TIME = 136 toWire MONDAY = 107 toWire TUESDAY = 108 toWire WEDNESDAY = 109 toWire THURSDAY = 110 toWire FRIDAY = 111 toWire SATURDAY = 112 toWire SUNDAY = 113 toWire JANUARY = 114 toWire FEBRUARY = 115 toWire MARCH = 116 toWire APRIL = 117 toWire MAY = 118 toWire JUNE = 119 toWire JULY = 120 toWire AUGUST = 121 toWire SEPTEMBER = 122 toWire OCTOBER = 123 toWire NOVEMBER = 124 toWire DECEMBER = 125 toWire LITERAL = 137 toWire GROUP = 144 toWire SUM = 145 toWire AVG = 146 toWire MIN = 147 toWire MAX = 148 toWire SPLIT = 149 toWire UNGROUP = 150 toWire RANDOM = 151 toWire CHANGES = 152 toWire ARGS = 154 toWire BINARY = 155 toWire GEOJSON = 157 toWire TO_GEOJSON = 158 toWire POINT = 159 toWire LINE = 160 toWire POLYGON = 161 toWire DISTANCE = 162 toWire INTERSECTS = 163 toWire INCLUDES = 164 toWire CIRCLE = 165 toWire GET_INTERSECTING = 166 toWire FILL = 167 toWire GET_NEAREST = 168 toWire POLYGON_SUB = 171 fromWire 1 = Just DATUM fromWire 2 = Just MAKE_ARRAY fromWire 3 = Just MAKE_OBJ fromWire 10 = Just VAR fromWire 11 = Just JAVASCRIPT fromWire 169 = Just UUID fromWire 153 = Just HTTP fromWire 12 = Just ERROR fromWire 13 = Just IMPLICIT_VAR fromWire 14 = Just DB fromWire 15 = Just TABLE fromWire 16 = Just GET fromWire 78 = Just GET_ALL fromWire 17 = Just EQ fromWire 18 = Just NE fromWire 19 = Just LT fromWire 20 = Just LE fromWire 21 = Just GT fromWire 22 = Just GE fromWire 23 = Just NOT fromWire 24 = Just ADD fromWire 25 = Just SUB fromWire 26 = Just MUL fromWire 27 = Just DIV fromWire 28 = Just MOD fromWire 29 = Just APPEND fromWire 80 = Just PREPEND fromWire 95 = Just DIFFERENCE fromWire 88 = Just SET_INSERT fromWire 89 = Just SET_INTERSECTION fromWire 90 = Just SET_UNION fromWire 91 = Just SET_DIFFERENCE fromWire 30 = Just SLICE fromWire 70 = Just SKIP fromWire 71 = Just LIMIT fromWire 87 = Just INDEXES_OF fromWire 93 = Just CONTAINS fromWire 31 = Just GET_FIELD fromWire 94 = Just KEYS fromWire 143 = Just OBJECT fromWire 32 = Just HAS_FIELDS fromWire 96 = Just WITH_FIELDS fromWire 33 = Just PLUCK fromWire 34 = Just WITHOUT fromWire 35 = Just MERGE fromWire 36 = Just BETWEEN fromWire 37 = Just REDUCE fromWire 38 = Just MAP fromWire 39 = Just FILTER fromWire 40 = Just CONCATMAP fromWire 41 = Just ORDERBY fromWire 42 = Just DISTINCT fromWire 43 = Just COUNT fromWire 86 = Just IS_EMPTY fromWire 44 = Just UNION fromWire 45 = Just NTH fromWire 170 = Just BRACKET fromWire 48 = Just INNER_JOIN fromWire 49 = Just OUTER_JOIN fromWire 50 = Just EQ_JOIN fromWire 72 = Just ZIP fromWire 82 = Just INSERT_AT fromWire 83 = Just DELETE_AT fromWire 84 = Just CHANGE_AT fromWire 85 = Just SPLICE_AT fromWire 51 = Just COERCE_TO fromWire 52 = Just TYPEOF fromWire 53 = Just UPDATE fromWire 54 = Just DELETE fromWire 55 = Just REPLACE fromWire 56 = Just INSERT fromWire 57 = Just DB_CREATE fromWire 58 = Just DB_DROP fromWire 59 = Just DB_LIST fromWire 60 = Just TABLE_CREATE fromWire 61 = Just TABLE_DROP fromWire 62 = Just TABLE_LIST fromWire 138 = Just SYNC fromWire 75 = Just INDEX_CREATE fromWire 76 = Just INDEX_DROP fromWire 77 = Just INDEX_LIST fromWire 139 = Just INDEX_STATUS fromWire 140 = Just INDEX_WAIT fromWire 156 = Just INDEX_RENAME fromWire 64 = Just FUNCALL fromWire 65 = Just BRANCH fromWire 66 = Just ANY fromWire 67 = Just ALL fromWire 68 = Just FOREACH fromWire 69 = Just FUNC fromWire 73 = Just ASC fromWire 74 = Just DESC fromWire 79 = Just INFO fromWire 97 = Just MATCH fromWire 141 = Just UPCASE fromWire 142 = Just DOWNCASE fromWire 81 = Just SAMPLE fromWire 92 = Just DEFAULT fromWire 98 = Just JSON fromWire 99 = Just ISO8601 fromWire 100 = Just TO_ISO8601 fromWire 101 = Just EPOCH_TIME fromWire 102 = Just TO_EPOCH_TIME fromWire 103 = Just NOW fromWire 104 = Just IN_TIMEZONE fromWire 105 = Just DURING fromWire 106 = Just DATE fromWire 126 = Just TIME_OF_DAY fromWire 127 = Just TIMEZONE fromWire 128 = Just YEAR fromWire 129 = Just MONTH fromWire 130 = Just DAY fromWire 131 = Just DAY_OF_WEEK fromWire 132 = Just DAY_OF_YEAR fromWire 133 = Just HOURS fromWire 134 = Just MINUTES fromWire 135 = Just SECONDS fromWire 136 = Just TIME fromWire 107 = Just MONDAY fromWire 108 = Just TUESDAY fromWire 109 = Just WEDNESDAY fromWire 110 = Just THURSDAY fromWire 111 = Just FRIDAY fromWire 112 = Just SATURDAY fromWire 113 = Just SUNDAY fromWire 114 = Just JANUARY fromWire 115 = Just FEBRUARY fromWire 116 = Just MARCH fromWire 117 = Just APRIL fromWire 118 = Just MAY fromWire 119 = Just JUNE fromWire 120 = Just JULY fromWire 121 = Just AUGUST fromWire 122 = Just SEPTEMBER fromWire 123 = Just OCTOBER fromWire 124 = Just NOVEMBER fromWire 125 = Just DECEMBER fromWire 137 = Just LITERAL fromWire 144 = Just GROUP fromWire 145 = Just SUM fromWire 146 = Just AVG fromWire 147 = Just MIN fromWire 148 = Just MAX fromWire 149 = Just SPLIT fromWire 150 = Just UNGROUP fromWire 151 = Just RANDOM fromWire 152 = Just CHANGES fromWire 154 = Just ARGS fromWire 155 = Just BINARY fromWire 157 = Just GEOJSON fromWire 158 = Just TO_GEOJSON fromWire 159 = Just POINT fromWire 160 = Just LINE fromWire 161 = Just POLYGON fromWire 162 = Just DISTANCE fromWire 163 = Just INTERSECTS fromWire 164 = Just INCLUDES fromWire 165 = Just CIRCLE fromWire 166 = Just GET_INTERSECTING fromWire 167 = Just FILL fromWire 168 = Just GET_NEAREST fromWire 171 = Just POLYGON_SUB fromWire _ = Nothing