github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/sem/tree/eval_expr_generated.go (about) 1 // Copyright 2022 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 // Code generated by eval_gen.go. DO NOT EDIT. 12 // Regenerate this file with either of the following commands: 13 // 14 // ./dev generate go 15 // go generate ./pkg/sql/sem/tree 16 // 17 // If you use the dev command and you have added a new tree expression, like 18 // tree.XYZ in a new file, you may get the confusing error: undefined: XYZ. 19 // Run './dev generate bazel' to fix this. 20 package tree 21 22 import "context" 23 24 // ExprEvaluator is used to evaluate TypedExpr expressions. 25 type ExprEvaluator interface { 26 EvalAllColumnsSelector(context.Context, *AllColumnsSelector) (Datum, error) 27 EvalAndExpr(context.Context, *AndExpr) (Datum, error) 28 EvalArray(context.Context, *Array) (Datum, error) 29 EvalArrayFlatten(context.Context, *ArrayFlatten) (Datum, error) 30 EvalBinaryExpr(context.Context, *BinaryExpr) (Datum, error) 31 EvalCaseExpr(context.Context, *CaseExpr) (Datum, error) 32 EvalCastExpr(context.Context, *CastExpr) (Datum, error) 33 EvalCoalesceExpr(context.Context, *CoalesceExpr) (Datum, error) 34 EvalCollateExpr(context.Context, *CollateExpr) (Datum, error) 35 EvalColumnAccessExpr(context.Context, *ColumnAccessExpr) (Datum, error) 36 EvalColumnItem(context.Context, *ColumnItem) (Datum, error) 37 EvalComparisonExpr(context.Context, *ComparisonExpr) (Datum, error) 38 EvalDefaultVal(context.Context, *DefaultVal) (Datum, error) 39 EvalFuncExpr(context.Context, *FuncExpr) (Datum, error) 40 EvalIfErrExpr(context.Context, *IfErrExpr) (Datum, error) 41 EvalIfExpr(context.Context, *IfExpr) (Datum, error) 42 EvalIndexedVar(context.Context, *IndexedVar) (Datum, error) 43 EvalIndirectionExpr(context.Context, *IndirectionExpr) (Datum, error) 44 EvalIsNotNullExpr(context.Context, *IsNotNullExpr) (Datum, error) 45 EvalIsNullExpr(context.Context, *IsNullExpr) (Datum, error) 46 EvalIsOfTypeExpr(context.Context, *IsOfTypeExpr) (Datum, error) 47 EvalNotExpr(context.Context, *NotExpr) (Datum, error) 48 EvalNullIfExpr(context.Context, *NullIfExpr) (Datum, error) 49 EvalOrExpr(context.Context, *OrExpr) (Datum, error) 50 EvalParenExpr(context.Context, *ParenExpr) (Datum, error) 51 EvalPlaceholder(context.Context, *Placeholder) (Datum, error) 52 EvalRangeCond(context.Context, *RangeCond) (Datum, error) 53 EvalRoutineExpr(context.Context, *RoutineExpr) (Datum, error) 54 EvalSubquery(context.Context, *Subquery) (Datum, error) 55 EvalTuple(context.Context, *Tuple) (Datum, error) 56 EvalTupleStar(context.Context, *TupleStar) (Datum, error) 57 EvalTypedDummy(context.Context, *TypedDummy) (Datum, error) 58 EvalUnaryExpr(context.Context, *UnaryExpr) (Datum, error) 59 EvalUnqualifiedStar(context.Context, UnqualifiedStar) (Datum, error) 60 EvalUnresolvedName(context.Context, *UnresolvedName) (Datum, error) 61 } 62 63 64 // Eval is part of the TypedExpr interface. 65 func (node *AllColumnsSelector) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 66 return v.EvalAllColumnsSelector(ctx, node) 67 } 68 69 // Eval is part of the TypedExpr interface. 70 func (node *AndExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 71 return v.EvalAndExpr(ctx, node) 72 } 73 74 // Eval is part of the TypedExpr interface. 75 func (node *Array) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 76 return v.EvalArray(ctx, node) 77 } 78 79 // Eval is part of the TypedExpr interface. 80 func (node *ArrayFlatten) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 81 return v.EvalArrayFlatten(ctx, node) 82 } 83 84 // Eval is part of the TypedExpr interface. 85 func (node *BinaryExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 86 return v.EvalBinaryExpr(ctx, node) 87 } 88 89 // Eval is part of the TypedExpr interface. 90 func (node *CaseExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 91 return v.EvalCaseExpr(ctx, node) 92 } 93 94 // Eval is part of the TypedExpr interface. 95 func (node *CastExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 96 return v.EvalCastExpr(ctx, node) 97 } 98 99 // Eval is part of the TypedExpr interface. 100 func (node *CoalesceExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 101 return v.EvalCoalesceExpr(ctx, node) 102 } 103 104 // Eval is part of the TypedExpr interface. 105 func (node *CollateExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 106 return v.EvalCollateExpr(ctx, node) 107 } 108 109 // Eval is part of the TypedExpr interface. 110 func (node *ColumnAccessExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 111 return v.EvalColumnAccessExpr(ctx, node) 112 } 113 114 // Eval is part of the TypedExpr interface. 115 func (node *ColumnItem) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 116 return v.EvalColumnItem(ctx, node) 117 } 118 119 // Eval is part of the TypedExpr interface. 120 func (node *ComparisonExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 121 return v.EvalComparisonExpr(ctx, node) 122 } 123 124 // Eval is part of the TypedExpr interface. 125 func (node *DArray) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 126 return node, nil 127 } 128 129 // Eval is part of the TypedExpr interface. 130 func (node *DBitArray) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 131 return node, nil 132 } 133 134 // Eval is part of the TypedExpr interface. 135 func (node *DBool) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 136 return node, nil 137 } 138 139 // Eval is part of the TypedExpr interface. 140 func (node *DBox2D) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 141 return node, nil 142 } 143 144 // Eval is part of the TypedExpr interface. 145 func (node *DBytes) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 146 return node, nil 147 } 148 149 // Eval is part of the TypedExpr interface. 150 func (node *DCollatedString) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 151 return node, nil 152 } 153 154 // Eval is part of the TypedExpr interface. 155 func (node *DDate) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 156 return node, nil 157 } 158 159 // Eval is part of the TypedExpr interface. 160 func (node *DDecimal) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 161 return node, nil 162 } 163 164 // Eval is part of the TypedExpr interface. 165 func (node *DEncodedKey) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 166 return node, nil 167 } 168 169 // Eval is part of the TypedExpr interface. 170 func (node *DEnum) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 171 return node, nil 172 } 173 174 // Eval is part of the TypedExpr interface. 175 func (node *DFloat) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 176 return node, nil 177 } 178 179 // Eval is part of the TypedExpr interface. 180 func (node *DGeography) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 181 return node, nil 182 } 183 184 // Eval is part of the TypedExpr interface. 185 func (node *DGeometry) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 186 return node, nil 187 } 188 189 // Eval is part of the TypedExpr interface. 190 func (node *DIPAddr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 191 return node, nil 192 } 193 194 // Eval is part of the TypedExpr interface. 195 func (node *DInt) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 196 return node, nil 197 } 198 199 // Eval is part of the TypedExpr interface. 200 func (node *DInterval) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 201 return node, nil 202 } 203 204 // Eval is part of the TypedExpr interface. 205 func (node *DJSON) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 206 return node, nil 207 } 208 209 // Eval is part of the TypedExpr interface. 210 func (node *DOid) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 211 return node, nil 212 } 213 214 // Eval is part of the TypedExpr interface. 215 func (node *DOidWrapper) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 216 return node, nil 217 } 218 219 // Eval is part of the TypedExpr interface. 220 func (node *DPGLSN) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 221 return node, nil 222 } 223 224 // Eval is part of the TypedExpr interface. 225 func (node *DString) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 226 return node, nil 227 } 228 229 // Eval is part of the TypedExpr interface. 230 func (node *DTSQuery) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 231 return node, nil 232 } 233 234 // Eval is part of the TypedExpr interface. 235 func (node *DTSVector) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 236 return node, nil 237 } 238 239 // Eval is part of the TypedExpr interface. 240 func (node *DTime) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 241 return node, nil 242 } 243 244 // Eval is part of the TypedExpr interface. 245 func (node *DTimeTZ) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 246 return node, nil 247 } 248 249 // Eval is part of the TypedExpr interface. 250 func (node *DTimestamp) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 251 return node, nil 252 } 253 254 // Eval is part of the TypedExpr interface. 255 func (node *DTimestampTZ) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 256 return node, nil 257 } 258 259 // Eval is part of the TypedExpr interface. 260 func (node *DTuple) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 261 return node, nil 262 } 263 264 // Eval is part of the TypedExpr interface. 265 func (node *DUuid) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 266 return node, nil 267 } 268 269 // Eval is part of the TypedExpr interface. 270 func (node *DVoid) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 271 return node, nil 272 } 273 274 // Eval is part of the TypedExpr interface. 275 func (node *DefaultVal) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 276 return v.EvalDefaultVal(ctx, node) 277 } 278 279 // Eval is part of the TypedExpr interface. 280 func (node *FuncExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 281 return v.EvalFuncExpr(ctx, node) 282 } 283 284 // Eval is part of the TypedExpr interface. 285 func (node *IfErrExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 286 return v.EvalIfErrExpr(ctx, node) 287 } 288 289 // Eval is part of the TypedExpr interface. 290 func (node *IfExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 291 return v.EvalIfExpr(ctx, node) 292 } 293 294 // Eval is part of the TypedExpr interface. 295 func (node *IndexedVar) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 296 return v.EvalIndexedVar(ctx, node) 297 } 298 299 // Eval is part of the TypedExpr interface. 300 func (node *IndirectionExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 301 return v.EvalIndirectionExpr(ctx, node) 302 } 303 304 // Eval is part of the TypedExpr interface. 305 func (node *IsNotNullExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 306 return v.EvalIsNotNullExpr(ctx, node) 307 } 308 309 // Eval is part of the TypedExpr interface. 310 func (node *IsNullExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 311 return v.EvalIsNullExpr(ctx, node) 312 } 313 314 // Eval is part of the TypedExpr interface. 315 func (node *IsOfTypeExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 316 return v.EvalIsOfTypeExpr(ctx, node) 317 } 318 319 // Eval is part of the TypedExpr interface. 320 func (node *NotExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 321 return v.EvalNotExpr(ctx, node) 322 } 323 324 // Eval is part of the TypedExpr interface. 325 func (node *NullIfExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 326 return v.EvalNullIfExpr(ctx, node) 327 } 328 329 // Eval is part of the TypedExpr interface. 330 func (node *OrExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 331 return v.EvalOrExpr(ctx, node) 332 } 333 334 // Eval is part of the TypedExpr interface. 335 func (node *ParenExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 336 return v.EvalParenExpr(ctx, node) 337 } 338 339 // Eval is part of the TypedExpr interface. 340 func (node *Placeholder) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 341 return v.EvalPlaceholder(ctx, node) 342 } 343 344 // Eval is part of the TypedExpr interface. 345 func (node *RangeCond) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 346 return v.EvalRangeCond(ctx, node) 347 } 348 349 // Eval is part of the TypedExpr interface. 350 func (node *RoutineExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 351 return v.EvalRoutineExpr(ctx, node) 352 } 353 354 // Eval is part of the TypedExpr interface. 355 func (node *Subquery) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 356 return v.EvalSubquery(ctx, node) 357 } 358 359 // Eval is part of the TypedExpr interface. 360 func (node *Tuple) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 361 return v.EvalTuple(ctx, node) 362 } 363 364 // Eval is part of the TypedExpr interface. 365 func (node *TupleStar) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 366 return v.EvalTupleStar(ctx, node) 367 } 368 369 // Eval is part of the TypedExpr interface. 370 func (node *TypedDummy) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 371 return v.EvalTypedDummy(ctx, node) 372 } 373 374 // Eval is part of the TypedExpr interface. 375 func (node *UnaryExpr) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 376 return v.EvalUnaryExpr(ctx, node) 377 } 378 379 // Eval is part of the TypedExpr interface. 380 func (node UnqualifiedStar) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 381 return v.EvalUnqualifiedStar(ctx, node) 382 } 383 384 // Eval is part of the TypedExpr interface. 385 func (node *UnresolvedName) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 386 return v.EvalUnresolvedName(ctx, node) 387 } 388 389 // Eval is part of the TypedExpr interface. 390 func (node dNull) Eval(ctx context.Context, v ExprEvaluator) (Datum, error) { 391 return node, nil 392 } 393