github.com/dolthub/go-mysql-server@v0.18.0/sql/plan/window_frame.og.go (about) 1 // Code generated by optgen; DO NOT EDIT. 2 3 package plan 4 5 import ( 6 "github.com/dolthub/go-mysql-server/sql" 7 agg "github.com/dolthub/go-mysql-server/sql/expression/function/aggregation" 8 ) 9 10 type RowsUnboundedPrecedingToNPrecedingFrame struct { 11 windowFrameBase 12 } 13 14 var _ sql.WindowFrame = (*RowsUnboundedPrecedingToNPrecedingFrame)(nil) 15 16 func NewRowsUnboundedPrecedingToNPrecedingFrame(endNPreceding sql.Expression) *RowsUnboundedPrecedingToNPrecedingFrame { 17 return &RowsUnboundedPrecedingToNPrecedingFrame{ 18 windowFrameBase{ 19 isRows: true, 20 unboundedPreceding: true, 21 endNPreceding: endNPreceding, 22 }, 23 } 24 } 25 26 func (f *RowsUnboundedPrecedingToNPrecedingFrame) UnboundedPreceding() bool { 27 return f.unboundedPreceding 28 } 29 30 func (f *RowsUnboundedPrecedingToNPrecedingFrame) StartNPreceding() sql.Expression { 31 return f.startNPreceding 32 } 33 34 func (f *RowsUnboundedPrecedingToNPrecedingFrame) StartCurrentRow() bool { 35 return f.startCurrentRow 36 } 37 38 func (f *RowsUnboundedPrecedingToNPrecedingFrame) StartNFollowing() sql.Expression { 39 return f.startNFollowing 40 } 41 42 func (f *RowsUnboundedPrecedingToNPrecedingFrame) EndNPreceding() sql.Expression { 43 return f.endNPreceding 44 } 45 46 func (f *RowsUnboundedPrecedingToNPrecedingFrame) EndCurrentRow() bool { 47 return f.endCurrentRow 48 } 49 50 func (f *RowsUnboundedPrecedingToNPrecedingFrame) EndNFollowing() sql.Expression { 51 return f.endNFollowing 52 } 53 54 func (f *RowsUnboundedPrecedingToNPrecedingFrame) UnboundedFollowing() bool { 55 return f.unboundedFollowing 56 } 57 58 func (f *RowsUnboundedPrecedingToNPrecedingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 59 return agg.NewRowsUnboundedPrecedingToNPrecedingFramer(f, w) 60 } 61 62 type RowsUnboundedPrecedingToCurrentRowFrame struct { 63 windowFrameBase 64 } 65 66 var _ sql.WindowFrame = (*RowsUnboundedPrecedingToCurrentRowFrame)(nil) 67 68 func NewRowsUnboundedPrecedingToCurrentRowFrame() *RowsUnboundedPrecedingToCurrentRowFrame { 69 return &RowsUnboundedPrecedingToCurrentRowFrame{ 70 windowFrameBase{ 71 isRows: true, 72 unboundedPreceding: true, 73 endCurrentRow: true, 74 }, 75 } 76 } 77 78 func (f *RowsUnboundedPrecedingToCurrentRowFrame) UnboundedPreceding() bool { 79 return f.unboundedPreceding 80 } 81 82 func (f *RowsUnboundedPrecedingToCurrentRowFrame) StartNPreceding() sql.Expression { 83 return f.startNPreceding 84 } 85 86 func (f *RowsUnboundedPrecedingToCurrentRowFrame) StartCurrentRow() bool { 87 return f.startCurrentRow 88 } 89 90 func (f *RowsUnboundedPrecedingToCurrentRowFrame) StartNFollowing() sql.Expression { 91 return f.startNFollowing 92 } 93 94 func (f *RowsUnboundedPrecedingToCurrentRowFrame) EndNPreceding() sql.Expression { 95 return f.endNPreceding 96 } 97 98 func (f *RowsUnboundedPrecedingToCurrentRowFrame) EndCurrentRow() bool { 99 return f.endCurrentRow 100 } 101 102 func (f *RowsUnboundedPrecedingToCurrentRowFrame) EndNFollowing() sql.Expression { 103 return f.endNFollowing 104 } 105 106 func (f *RowsUnboundedPrecedingToCurrentRowFrame) UnboundedFollowing() bool { 107 return f.unboundedFollowing 108 } 109 110 func (f *RowsUnboundedPrecedingToCurrentRowFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 111 return agg.NewRowsUnboundedPrecedingToCurrentRowFramer(f, w) 112 } 113 114 type RowsUnboundedPrecedingToNFollowingFrame struct { 115 windowFrameBase 116 } 117 118 var _ sql.WindowFrame = (*RowsUnboundedPrecedingToNFollowingFrame)(nil) 119 120 func NewRowsUnboundedPrecedingToNFollowingFrame(endNFollowing sql.Expression) *RowsUnboundedPrecedingToNFollowingFrame { 121 return &RowsUnboundedPrecedingToNFollowingFrame{ 122 windowFrameBase{ 123 isRows: true, 124 unboundedPreceding: true, 125 endNFollowing: endNFollowing, 126 }, 127 } 128 } 129 130 func (f *RowsUnboundedPrecedingToNFollowingFrame) UnboundedPreceding() bool { 131 return f.unboundedPreceding 132 } 133 134 func (f *RowsUnboundedPrecedingToNFollowingFrame) StartNPreceding() sql.Expression { 135 return f.startNPreceding 136 } 137 138 func (f *RowsUnboundedPrecedingToNFollowingFrame) StartCurrentRow() bool { 139 return f.startCurrentRow 140 } 141 142 func (f *RowsUnboundedPrecedingToNFollowingFrame) StartNFollowing() sql.Expression { 143 return f.startNFollowing 144 } 145 146 func (f *RowsUnboundedPrecedingToNFollowingFrame) EndNPreceding() sql.Expression { 147 return f.endNPreceding 148 } 149 150 func (f *RowsUnboundedPrecedingToNFollowingFrame) EndCurrentRow() bool { 151 return f.endCurrentRow 152 } 153 154 func (f *RowsUnboundedPrecedingToNFollowingFrame) EndNFollowing() sql.Expression { 155 return f.endNFollowing 156 } 157 158 func (f *RowsUnboundedPrecedingToNFollowingFrame) UnboundedFollowing() bool { 159 return f.unboundedFollowing 160 } 161 162 func (f *RowsUnboundedPrecedingToNFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 163 return agg.NewRowsUnboundedPrecedingToNFollowingFramer(f, w) 164 } 165 166 type RowsUnboundedPrecedingToUnboundedFollowingFrame struct { 167 windowFrameBase 168 } 169 170 var _ sql.WindowFrame = (*RowsUnboundedPrecedingToUnboundedFollowingFrame)(nil) 171 172 func NewRowsUnboundedPrecedingToUnboundedFollowingFrame() *RowsUnboundedPrecedingToUnboundedFollowingFrame { 173 return &RowsUnboundedPrecedingToUnboundedFollowingFrame{ 174 windowFrameBase{ 175 isRows: true, 176 unboundedPreceding: true, 177 unboundedFollowing: true, 178 }, 179 } 180 } 181 182 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) UnboundedPreceding() bool { 183 return f.unboundedPreceding 184 } 185 186 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) StartNPreceding() sql.Expression { 187 return f.startNPreceding 188 } 189 190 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) StartCurrentRow() bool { 191 return f.startCurrentRow 192 } 193 194 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) StartNFollowing() sql.Expression { 195 return f.startNFollowing 196 } 197 198 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) EndNPreceding() sql.Expression { 199 return f.endNPreceding 200 } 201 202 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) EndCurrentRow() bool { 203 return f.endCurrentRow 204 } 205 206 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) EndNFollowing() sql.Expression { 207 return f.endNFollowing 208 } 209 210 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) UnboundedFollowing() bool { 211 return f.unboundedFollowing 212 } 213 214 func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 215 return agg.NewRowsUnboundedPrecedingToUnboundedFollowingFramer(f, w) 216 } 217 218 type RowsNPrecedingToNPrecedingFrame struct { 219 windowFrameBase 220 } 221 222 var _ sql.WindowFrame = (*RowsNPrecedingToNPrecedingFrame)(nil) 223 224 func NewRowsNPrecedingToNPrecedingFrame(startNPreceding sql.Expression, endNPreceding sql.Expression) *RowsNPrecedingToNPrecedingFrame { 225 return &RowsNPrecedingToNPrecedingFrame{ 226 windowFrameBase{ 227 isRows: true, 228 startNPreceding: startNPreceding, 229 endNPreceding: endNPreceding, 230 }, 231 } 232 } 233 234 func (f *RowsNPrecedingToNPrecedingFrame) UnboundedPreceding() bool { 235 return f.unboundedPreceding 236 } 237 238 func (f *RowsNPrecedingToNPrecedingFrame) StartNPreceding() sql.Expression { 239 return f.startNPreceding 240 } 241 242 func (f *RowsNPrecedingToNPrecedingFrame) StartCurrentRow() bool { 243 return f.startCurrentRow 244 } 245 246 func (f *RowsNPrecedingToNPrecedingFrame) StartNFollowing() sql.Expression { 247 return f.startNFollowing 248 } 249 250 func (f *RowsNPrecedingToNPrecedingFrame) EndNPreceding() sql.Expression { 251 return f.endNPreceding 252 } 253 254 func (f *RowsNPrecedingToNPrecedingFrame) EndCurrentRow() bool { 255 return f.endCurrentRow 256 } 257 258 func (f *RowsNPrecedingToNPrecedingFrame) EndNFollowing() sql.Expression { 259 return f.endNFollowing 260 } 261 262 func (f *RowsNPrecedingToNPrecedingFrame) UnboundedFollowing() bool { 263 return f.unboundedFollowing 264 } 265 266 func (f *RowsNPrecedingToNPrecedingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 267 return agg.NewRowsNPrecedingToNPrecedingFramer(f, w) 268 } 269 270 type RowsNPrecedingToCurrentRowFrame struct { 271 windowFrameBase 272 } 273 274 var _ sql.WindowFrame = (*RowsNPrecedingToCurrentRowFrame)(nil) 275 276 func NewRowsNPrecedingToCurrentRowFrame(startNPreceding sql.Expression) *RowsNPrecedingToCurrentRowFrame { 277 return &RowsNPrecedingToCurrentRowFrame{ 278 windowFrameBase{ 279 isRows: true, 280 startNPreceding: startNPreceding, 281 endCurrentRow: true, 282 }, 283 } 284 } 285 286 func (f *RowsNPrecedingToCurrentRowFrame) UnboundedPreceding() bool { 287 return f.unboundedPreceding 288 } 289 290 func (f *RowsNPrecedingToCurrentRowFrame) StartNPreceding() sql.Expression { 291 return f.startNPreceding 292 } 293 294 func (f *RowsNPrecedingToCurrentRowFrame) StartCurrentRow() bool { 295 return f.startCurrentRow 296 } 297 298 func (f *RowsNPrecedingToCurrentRowFrame) StartNFollowing() sql.Expression { 299 return f.startNFollowing 300 } 301 302 func (f *RowsNPrecedingToCurrentRowFrame) EndNPreceding() sql.Expression { 303 return f.endNPreceding 304 } 305 306 func (f *RowsNPrecedingToCurrentRowFrame) EndCurrentRow() bool { 307 return f.endCurrentRow 308 } 309 310 func (f *RowsNPrecedingToCurrentRowFrame) EndNFollowing() sql.Expression { 311 return f.endNFollowing 312 } 313 314 func (f *RowsNPrecedingToCurrentRowFrame) UnboundedFollowing() bool { 315 return f.unboundedFollowing 316 } 317 318 func (f *RowsNPrecedingToCurrentRowFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 319 return agg.NewRowsNPrecedingToCurrentRowFramer(f, w) 320 } 321 322 type RowsNPrecedingToNFollowingFrame struct { 323 windowFrameBase 324 } 325 326 var _ sql.WindowFrame = (*RowsNPrecedingToNFollowingFrame)(nil) 327 328 func NewRowsNPrecedingToNFollowingFrame(startNPreceding sql.Expression, endNFollowing sql.Expression) *RowsNPrecedingToNFollowingFrame { 329 return &RowsNPrecedingToNFollowingFrame{ 330 windowFrameBase{ 331 isRows: true, 332 startNPreceding: startNPreceding, 333 endNFollowing: endNFollowing, 334 }, 335 } 336 } 337 338 func (f *RowsNPrecedingToNFollowingFrame) UnboundedPreceding() bool { 339 return f.unboundedPreceding 340 } 341 342 func (f *RowsNPrecedingToNFollowingFrame) StartNPreceding() sql.Expression { 343 return f.startNPreceding 344 } 345 346 func (f *RowsNPrecedingToNFollowingFrame) StartCurrentRow() bool { 347 return f.startCurrentRow 348 } 349 350 func (f *RowsNPrecedingToNFollowingFrame) StartNFollowing() sql.Expression { 351 return f.startNFollowing 352 } 353 354 func (f *RowsNPrecedingToNFollowingFrame) EndNPreceding() sql.Expression { 355 return f.endNPreceding 356 } 357 358 func (f *RowsNPrecedingToNFollowingFrame) EndCurrentRow() bool { 359 return f.endCurrentRow 360 } 361 362 func (f *RowsNPrecedingToNFollowingFrame) EndNFollowing() sql.Expression { 363 return f.endNFollowing 364 } 365 366 func (f *RowsNPrecedingToNFollowingFrame) UnboundedFollowing() bool { 367 return f.unboundedFollowing 368 } 369 370 func (f *RowsNPrecedingToNFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 371 return agg.NewRowsNPrecedingToNFollowingFramer(f, w) 372 } 373 374 type RowsNPrecedingToUnboundedFollowingFrame struct { 375 windowFrameBase 376 } 377 378 var _ sql.WindowFrame = (*RowsNPrecedingToUnboundedFollowingFrame)(nil) 379 380 func NewRowsNPrecedingToUnboundedFollowingFrame(startNPreceding sql.Expression) *RowsNPrecedingToUnboundedFollowingFrame { 381 return &RowsNPrecedingToUnboundedFollowingFrame{ 382 windowFrameBase{ 383 isRows: true, 384 startNPreceding: startNPreceding, 385 unboundedFollowing: true, 386 }, 387 } 388 } 389 390 func (f *RowsNPrecedingToUnboundedFollowingFrame) UnboundedPreceding() bool { 391 return f.unboundedPreceding 392 } 393 394 func (f *RowsNPrecedingToUnboundedFollowingFrame) StartNPreceding() sql.Expression { 395 return f.startNPreceding 396 } 397 398 func (f *RowsNPrecedingToUnboundedFollowingFrame) StartCurrentRow() bool { 399 return f.startCurrentRow 400 } 401 402 func (f *RowsNPrecedingToUnboundedFollowingFrame) StartNFollowing() sql.Expression { 403 return f.startNFollowing 404 } 405 406 func (f *RowsNPrecedingToUnboundedFollowingFrame) EndNPreceding() sql.Expression { 407 return f.endNPreceding 408 } 409 410 func (f *RowsNPrecedingToUnboundedFollowingFrame) EndCurrentRow() bool { 411 return f.endCurrentRow 412 } 413 414 func (f *RowsNPrecedingToUnboundedFollowingFrame) EndNFollowing() sql.Expression { 415 return f.endNFollowing 416 } 417 418 func (f *RowsNPrecedingToUnboundedFollowingFrame) UnboundedFollowing() bool { 419 return f.unboundedFollowing 420 } 421 422 func (f *RowsNPrecedingToUnboundedFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 423 return agg.NewRowsNPrecedingToUnboundedFollowingFramer(f, w) 424 } 425 426 type RowsCurrentRowToNPrecedingFrame struct { 427 windowFrameBase 428 } 429 430 var _ sql.WindowFrame = (*RowsCurrentRowToNPrecedingFrame)(nil) 431 432 func NewRowsCurrentRowToNPrecedingFrame(endNPreceding sql.Expression) *RowsCurrentRowToNPrecedingFrame { 433 return &RowsCurrentRowToNPrecedingFrame{ 434 windowFrameBase{ 435 isRows: true, 436 startCurrentRow: true, 437 endNPreceding: endNPreceding, 438 }, 439 } 440 } 441 442 func (f *RowsCurrentRowToNPrecedingFrame) UnboundedPreceding() bool { 443 return f.unboundedPreceding 444 } 445 446 func (f *RowsCurrentRowToNPrecedingFrame) StartNPreceding() sql.Expression { 447 return f.startNPreceding 448 } 449 450 func (f *RowsCurrentRowToNPrecedingFrame) StartCurrentRow() bool { 451 return f.startCurrentRow 452 } 453 454 func (f *RowsCurrentRowToNPrecedingFrame) StartNFollowing() sql.Expression { 455 return f.startNFollowing 456 } 457 458 func (f *RowsCurrentRowToNPrecedingFrame) EndNPreceding() sql.Expression { 459 return f.endNPreceding 460 } 461 462 func (f *RowsCurrentRowToNPrecedingFrame) EndCurrentRow() bool { 463 return f.endCurrentRow 464 } 465 466 func (f *RowsCurrentRowToNPrecedingFrame) EndNFollowing() sql.Expression { 467 return f.endNFollowing 468 } 469 470 func (f *RowsCurrentRowToNPrecedingFrame) UnboundedFollowing() bool { 471 return f.unboundedFollowing 472 } 473 474 func (f *RowsCurrentRowToNPrecedingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 475 return agg.NewRowsCurrentRowToNPrecedingFramer(f, w) 476 } 477 478 type RowsCurrentRowToCurrentRowFrame struct { 479 windowFrameBase 480 } 481 482 var _ sql.WindowFrame = (*RowsCurrentRowToCurrentRowFrame)(nil) 483 484 func NewRowsCurrentRowToCurrentRowFrame() *RowsCurrentRowToCurrentRowFrame { 485 return &RowsCurrentRowToCurrentRowFrame{ 486 windowFrameBase{ 487 isRows: true, 488 startCurrentRow: true, 489 endCurrentRow: true, 490 }, 491 } 492 } 493 494 func (f *RowsCurrentRowToCurrentRowFrame) UnboundedPreceding() bool { 495 return f.unboundedPreceding 496 } 497 498 func (f *RowsCurrentRowToCurrentRowFrame) StartNPreceding() sql.Expression { 499 return f.startNPreceding 500 } 501 502 func (f *RowsCurrentRowToCurrentRowFrame) StartCurrentRow() bool { 503 return f.startCurrentRow 504 } 505 506 func (f *RowsCurrentRowToCurrentRowFrame) StartNFollowing() sql.Expression { 507 return f.startNFollowing 508 } 509 510 func (f *RowsCurrentRowToCurrentRowFrame) EndNPreceding() sql.Expression { 511 return f.endNPreceding 512 } 513 514 func (f *RowsCurrentRowToCurrentRowFrame) EndCurrentRow() bool { 515 return f.endCurrentRow 516 } 517 518 func (f *RowsCurrentRowToCurrentRowFrame) EndNFollowing() sql.Expression { 519 return f.endNFollowing 520 } 521 522 func (f *RowsCurrentRowToCurrentRowFrame) UnboundedFollowing() bool { 523 return f.unboundedFollowing 524 } 525 526 func (f *RowsCurrentRowToCurrentRowFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 527 return agg.NewRowsCurrentRowToCurrentRowFramer(f, w) 528 } 529 530 type RowsCurrentRowToNFollowingFrame struct { 531 windowFrameBase 532 } 533 534 var _ sql.WindowFrame = (*RowsCurrentRowToNFollowingFrame)(nil) 535 536 func NewRowsCurrentRowToNFollowingFrame(endNFollowing sql.Expression) *RowsCurrentRowToNFollowingFrame { 537 return &RowsCurrentRowToNFollowingFrame{ 538 windowFrameBase{ 539 isRows: true, 540 startCurrentRow: true, 541 endNFollowing: endNFollowing, 542 }, 543 } 544 } 545 546 func (f *RowsCurrentRowToNFollowingFrame) UnboundedPreceding() bool { 547 return f.unboundedPreceding 548 } 549 550 func (f *RowsCurrentRowToNFollowingFrame) StartNPreceding() sql.Expression { 551 return f.startNPreceding 552 } 553 554 func (f *RowsCurrentRowToNFollowingFrame) StartCurrentRow() bool { 555 return f.startCurrentRow 556 } 557 558 func (f *RowsCurrentRowToNFollowingFrame) StartNFollowing() sql.Expression { 559 return f.startNFollowing 560 } 561 562 func (f *RowsCurrentRowToNFollowingFrame) EndNPreceding() sql.Expression { 563 return f.endNPreceding 564 } 565 566 func (f *RowsCurrentRowToNFollowingFrame) EndCurrentRow() bool { 567 return f.endCurrentRow 568 } 569 570 func (f *RowsCurrentRowToNFollowingFrame) EndNFollowing() sql.Expression { 571 return f.endNFollowing 572 } 573 574 func (f *RowsCurrentRowToNFollowingFrame) UnboundedFollowing() bool { 575 return f.unboundedFollowing 576 } 577 578 func (f *RowsCurrentRowToNFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 579 return agg.NewRowsCurrentRowToNFollowingFramer(f, w) 580 } 581 582 type RowsCurrentRowToUnboundedFollowingFrame struct { 583 windowFrameBase 584 } 585 586 var _ sql.WindowFrame = (*RowsCurrentRowToUnboundedFollowingFrame)(nil) 587 588 func NewRowsCurrentRowToUnboundedFollowingFrame() *RowsCurrentRowToUnboundedFollowingFrame { 589 return &RowsCurrentRowToUnboundedFollowingFrame{ 590 windowFrameBase{ 591 isRows: true, 592 startCurrentRow: true, 593 unboundedFollowing: true, 594 }, 595 } 596 } 597 598 func (f *RowsCurrentRowToUnboundedFollowingFrame) UnboundedPreceding() bool { 599 return f.unboundedPreceding 600 } 601 602 func (f *RowsCurrentRowToUnboundedFollowingFrame) StartNPreceding() sql.Expression { 603 return f.startNPreceding 604 } 605 606 func (f *RowsCurrentRowToUnboundedFollowingFrame) StartCurrentRow() bool { 607 return f.startCurrentRow 608 } 609 610 func (f *RowsCurrentRowToUnboundedFollowingFrame) StartNFollowing() sql.Expression { 611 return f.startNFollowing 612 } 613 614 func (f *RowsCurrentRowToUnboundedFollowingFrame) EndNPreceding() sql.Expression { 615 return f.endNPreceding 616 } 617 618 func (f *RowsCurrentRowToUnboundedFollowingFrame) EndCurrentRow() bool { 619 return f.endCurrentRow 620 } 621 622 func (f *RowsCurrentRowToUnboundedFollowingFrame) EndNFollowing() sql.Expression { 623 return f.endNFollowing 624 } 625 626 func (f *RowsCurrentRowToUnboundedFollowingFrame) UnboundedFollowing() bool { 627 return f.unboundedFollowing 628 } 629 630 func (f *RowsCurrentRowToUnboundedFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 631 return agg.NewRowsCurrentRowToUnboundedFollowingFramer(f, w) 632 } 633 634 type RowsNFollowingToNPrecedingFrame struct { 635 windowFrameBase 636 } 637 638 var _ sql.WindowFrame = (*RowsNFollowingToNPrecedingFrame)(nil) 639 640 func NewRowsNFollowingToNPrecedingFrame(startNFollowing sql.Expression, endNPreceding sql.Expression) *RowsNFollowingToNPrecedingFrame { 641 return &RowsNFollowingToNPrecedingFrame{ 642 windowFrameBase{ 643 isRows: true, 644 startNFollowing: startNFollowing, 645 endNPreceding: endNPreceding, 646 }, 647 } 648 } 649 650 func (f *RowsNFollowingToNPrecedingFrame) UnboundedPreceding() bool { 651 return f.unboundedPreceding 652 } 653 654 func (f *RowsNFollowingToNPrecedingFrame) StartNPreceding() sql.Expression { 655 return f.startNPreceding 656 } 657 658 func (f *RowsNFollowingToNPrecedingFrame) StartCurrentRow() bool { 659 return f.startCurrentRow 660 } 661 662 func (f *RowsNFollowingToNPrecedingFrame) StartNFollowing() sql.Expression { 663 return f.startNFollowing 664 } 665 666 func (f *RowsNFollowingToNPrecedingFrame) EndNPreceding() sql.Expression { 667 return f.endNPreceding 668 } 669 670 func (f *RowsNFollowingToNPrecedingFrame) EndCurrentRow() bool { 671 return f.endCurrentRow 672 } 673 674 func (f *RowsNFollowingToNPrecedingFrame) EndNFollowing() sql.Expression { 675 return f.endNFollowing 676 } 677 678 func (f *RowsNFollowingToNPrecedingFrame) UnboundedFollowing() bool { 679 return f.unboundedFollowing 680 } 681 682 func (f *RowsNFollowingToNPrecedingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 683 return agg.NewRowsNFollowingToNPrecedingFramer(f, w) 684 } 685 686 type RowsNFollowingToCurrentRowFrame struct { 687 windowFrameBase 688 } 689 690 var _ sql.WindowFrame = (*RowsNFollowingToCurrentRowFrame)(nil) 691 692 func NewRowsNFollowingToCurrentRowFrame(startNFollowing sql.Expression) *RowsNFollowingToCurrentRowFrame { 693 return &RowsNFollowingToCurrentRowFrame{ 694 windowFrameBase{ 695 isRows: true, 696 startNFollowing: startNFollowing, 697 endCurrentRow: true, 698 }, 699 } 700 } 701 702 func (f *RowsNFollowingToCurrentRowFrame) UnboundedPreceding() bool { 703 return f.unboundedPreceding 704 } 705 706 func (f *RowsNFollowingToCurrentRowFrame) StartNPreceding() sql.Expression { 707 return f.startNPreceding 708 } 709 710 func (f *RowsNFollowingToCurrentRowFrame) StartCurrentRow() bool { 711 return f.startCurrentRow 712 } 713 714 func (f *RowsNFollowingToCurrentRowFrame) StartNFollowing() sql.Expression { 715 return f.startNFollowing 716 } 717 718 func (f *RowsNFollowingToCurrentRowFrame) EndNPreceding() sql.Expression { 719 return f.endNPreceding 720 } 721 722 func (f *RowsNFollowingToCurrentRowFrame) EndCurrentRow() bool { 723 return f.endCurrentRow 724 } 725 726 func (f *RowsNFollowingToCurrentRowFrame) EndNFollowing() sql.Expression { 727 return f.endNFollowing 728 } 729 730 func (f *RowsNFollowingToCurrentRowFrame) UnboundedFollowing() bool { 731 return f.unboundedFollowing 732 } 733 734 func (f *RowsNFollowingToCurrentRowFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 735 return agg.NewRowsNFollowingToCurrentRowFramer(f, w) 736 } 737 738 type RowsNFollowingToNFollowingFrame struct { 739 windowFrameBase 740 } 741 742 var _ sql.WindowFrame = (*RowsNFollowingToNFollowingFrame)(nil) 743 744 func NewRowsNFollowingToNFollowingFrame(startNFollowing sql.Expression, endNFollowing sql.Expression) *RowsNFollowingToNFollowingFrame { 745 return &RowsNFollowingToNFollowingFrame{ 746 windowFrameBase{ 747 isRows: true, 748 startNFollowing: startNFollowing, 749 endNFollowing: endNFollowing, 750 }, 751 } 752 } 753 754 func (f *RowsNFollowingToNFollowingFrame) UnboundedPreceding() bool { 755 return f.unboundedPreceding 756 } 757 758 func (f *RowsNFollowingToNFollowingFrame) StartNPreceding() sql.Expression { 759 return f.startNPreceding 760 } 761 762 func (f *RowsNFollowingToNFollowingFrame) StartCurrentRow() bool { 763 return f.startCurrentRow 764 } 765 766 func (f *RowsNFollowingToNFollowingFrame) StartNFollowing() sql.Expression { 767 return f.startNFollowing 768 } 769 770 func (f *RowsNFollowingToNFollowingFrame) EndNPreceding() sql.Expression { 771 return f.endNPreceding 772 } 773 774 func (f *RowsNFollowingToNFollowingFrame) EndCurrentRow() bool { 775 return f.endCurrentRow 776 } 777 778 func (f *RowsNFollowingToNFollowingFrame) EndNFollowing() sql.Expression { 779 return f.endNFollowing 780 } 781 782 func (f *RowsNFollowingToNFollowingFrame) UnboundedFollowing() bool { 783 return f.unboundedFollowing 784 } 785 786 func (f *RowsNFollowingToNFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 787 return agg.NewRowsNFollowingToNFollowingFramer(f, w) 788 } 789 790 type RowsNFollowingToUnboundedFollowingFrame struct { 791 windowFrameBase 792 } 793 794 var _ sql.WindowFrame = (*RowsNFollowingToUnboundedFollowingFrame)(nil) 795 796 func NewRowsNFollowingToUnboundedFollowingFrame(startNFollowing sql.Expression) *RowsNFollowingToUnboundedFollowingFrame { 797 return &RowsNFollowingToUnboundedFollowingFrame{ 798 windowFrameBase{ 799 isRows: true, 800 startNFollowing: startNFollowing, 801 unboundedFollowing: true, 802 }, 803 } 804 } 805 806 func (f *RowsNFollowingToUnboundedFollowingFrame) UnboundedPreceding() bool { 807 return f.unboundedPreceding 808 } 809 810 func (f *RowsNFollowingToUnboundedFollowingFrame) StartNPreceding() sql.Expression { 811 return f.startNPreceding 812 } 813 814 func (f *RowsNFollowingToUnboundedFollowingFrame) StartCurrentRow() bool { 815 return f.startCurrentRow 816 } 817 818 func (f *RowsNFollowingToUnboundedFollowingFrame) StartNFollowing() sql.Expression { 819 return f.startNFollowing 820 } 821 822 func (f *RowsNFollowingToUnboundedFollowingFrame) EndNPreceding() sql.Expression { 823 return f.endNPreceding 824 } 825 826 func (f *RowsNFollowingToUnboundedFollowingFrame) EndCurrentRow() bool { 827 return f.endCurrentRow 828 } 829 830 func (f *RowsNFollowingToUnboundedFollowingFrame) EndNFollowing() sql.Expression { 831 return f.endNFollowing 832 } 833 834 func (f *RowsNFollowingToUnboundedFollowingFrame) UnboundedFollowing() bool { 835 return f.unboundedFollowing 836 } 837 838 func (f *RowsNFollowingToUnboundedFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 839 return agg.NewRowsNFollowingToUnboundedFollowingFramer(f, w) 840 } 841 842 type RangeUnboundedPrecedingToNPrecedingFrame struct { 843 windowFrameBase 844 } 845 846 var _ sql.WindowFrame = (*RangeUnboundedPrecedingToNPrecedingFrame)(nil) 847 848 func NewRangeUnboundedPrecedingToNPrecedingFrame(endNPreceding sql.Expression) *RangeUnboundedPrecedingToNPrecedingFrame { 849 return &RangeUnboundedPrecedingToNPrecedingFrame{ 850 windowFrameBase{ 851 isRange: true, 852 unboundedPreceding: true, 853 endNPreceding: endNPreceding, 854 }, 855 } 856 } 857 858 func (f *RangeUnboundedPrecedingToNPrecedingFrame) UnboundedPreceding() bool { 859 return f.unboundedPreceding 860 } 861 862 func (f *RangeUnboundedPrecedingToNPrecedingFrame) StartNPreceding() sql.Expression { 863 return f.startNPreceding 864 } 865 866 func (f *RangeUnboundedPrecedingToNPrecedingFrame) StartCurrentRow() bool { 867 return f.startCurrentRow 868 } 869 870 func (f *RangeUnboundedPrecedingToNPrecedingFrame) StartNFollowing() sql.Expression { 871 return f.startNFollowing 872 } 873 874 func (f *RangeUnboundedPrecedingToNPrecedingFrame) EndNPreceding() sql.Expression { 875 return f.endNPreceding 876 } 877 878 func (f *RangeUnboundedPrecedingToNPrecedingFrame) EndCurrentRow() bool { 879 return f.endCurrentRow 880 } 881 882 func (f *RangeUnboundedPrecedingToNPrecedingFrame) EndNFollowing() sql.Expression { 883 return f.endNFollowing 884 } 885 886 func (f *RangeUnboundedPrecedingToNPrecedingFrame) UnboundedFollowing() bool { 887 return f.unboundedFollowing 888 } 889 890 func (f *RangeUnboundedPrecedingToNPrecedingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 891 return agg.NewRangeUnboundedPrecedingToNPrecedingFramer(f, w) 892 } 893 894 type RangeUnboundedPrecedingToCurrentRowFrame struct { 895 windowFrameBase 896 } 897 898 var _ sql.WindowFrame = (*RangeUnboundedPrecedingToCurrentRowFrame)(nil) 899 900 func NewRangeUnboundedPrecedingToCurrentRowFrame() *RangeUnboundedPrecedingToCurrentRowFrame { 901 return &RangeUnboundedPrecedingToCurrentRowFrame{ 902 windowFrameBase{ 903 isRange: true, 904 unboundedPreceding: true, 905 endCurrentRow: true, 906 }, 907 } 908 } 909 910 func (f *RangeUnboundedPrecedingToCurrentRowFrame) UnboundedPreceding() bool { 911 return f.unboundedPreceding 912 } 913 914 func (f *RangeUnboundedPrecedingToCurrentRowFrame) StartNPreceding() sql.Expression { 915 return f.startNPreceding 916 } 917 918 func (f *RangeUnboundedPrecedingToCurrentRowFrame) StartCurrentRow() bool { 919 return f.startCurrentRow 920 } 921 922 func (f *RangeUnboundedPrecedingToCurrentRowFrame) StartNFollowing() sql.Expression { 923 return f.startNFollowing 924 } 925 926 func (f *RangeUnboundedPrecedingToCurrentRowFrame) EndNPreceding() sql.Expression { 927 return f.endNPreceding 928 } 929 930 func (f *RangeUnboundedPrecedingToCurrentRowFrame) EndCurrentRow() bool { 931 return f.endCurrentRow 932 } 933 934 func (f *RangeUnboundedPrecedingToCurrentRowFrame) EndNFollowing() sql.Expression { 935 return f.endNFollowing 936 } 937 938 func (f *RangeUnboundedPrecedingToCurrentRowFrame) UnboundedFollowing() bool { 939 return f.unboundedFollowing 940 } 941 942 func (f *RangeUnboundedPrecedingToCurrentRowFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 943 return agg.NewRangeUnboundedPrecedingToCurrentRowFramer(f, w) 944 } 945 946 type RangeUnboundedPrecedingToNFollowingFrame struct { 947 windowFrameBase 948 } 949 950 var _ sql.WindowFrame = (*RangeUnboundedPrecedingToNFollowingFrame)(nil) 951 952 func NewRangeUnboundedPrecedingToNFollowingFrame(endNFollowing sql.Expression) *RangeUnboundedPrecedingToNFollowingFrame { 953 return &RangeUnboundedPrecedingToNFollowingFrame{ 954 windowFrameBase{ 955 isRange: true, 956 unboundedPreceding: true, 957 endNFollowing: endNFollowing, 958 }, 959 } 960 } 961 962 func (f *RangeUnboundedPrecedingToNFollowingFrame) UnboundedPreceding() bool { 963 return f.unboundedPreceding 964 } 965 966 func (f *RangeUnboundedPrecedingToNFollowingFrame) StartNPreceding() sql.Expression { 967 return f.startNPreceding 968 } 969 970 func (f *RangeUnboundedPrecedingToNFollowingFrame) StartCurrentRow() bool { 971 return f.startCurrentRow 972 } 973 974 func (f *RangeUnboundedPrecedingToNFollowingFrame) StartNFollowing() sql.Expression { 975 return f.startNFollowing 976 } 977 978 func (f *RangeUnboundedPrecedingToNFollowingFrame) EndNPreceding() sql.Expression { 979 return f.endNPreceding 980 } 981 982 func (f *RangeUnboundedPrecedingToNFollowingFrame) EndCurrentRow() bool { 983 return f.endCurrentRow 984 } 985 986 func (f *RangeUnboundedPrecedingToNFollowingFrame) EndNFollowing() sql.Expression { 987 return f.endNFollowing 988 } 989 990 func (f *RangeUnboundedPrecedingToNFollowingFrame) UnboundedFollowing() bool { 991 return f.unboundedFollowing 992 } 993 994 func (f *RangeUnboundedPrecedingToNFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 995 return agg.NewRangeUnboundedPrecedingToNFollowingFramer(f, w) 996 } 997 998 type RangeUnboundedPrecedingToUnboundedFollowingFrame struct { 999 windowFrameBase 1000 } 1001 1002 var _ sql.WindowFrame = (*RangeUnboundedPrecedingToUnboundedFollowingFrame)(nil) 1003 1004 func NewRangeUnboundedPrecedingToUnboundedFollowingFrame() *RangeUnboundedPrecedingToUnboundedFollowingFrame { 1005 return &RangeUnboundedPrecedingToUnboundedFollowingFrame{ 1006 windowFrameBase{ 1007 isRange: true, 1008 unboundedPreceding: true, 1009 unboundedFollowing: true, 1010 }, 1011 } 1012 } 1013 1014 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) UnboundedPreceding() bool { 1015 return f.unboundedPreceding 1016 } 1017 1018 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) StartNPreceding() sql.Expression { 1019 return f.startNPreceding 1020 } 1021 1022 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) StartCurrentRow() bool { 1023 return f.startCurrentRow 1024 } 1025 1026 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) StartNFollowing() sql.Expression { 1027 return f.startNFollowing 1028 } 1029 1030 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) EndNPreceding() sql.Expression { 1031 return f.endNPreceding 1032 } 1033 1034 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) EndCurrentRow() bool { 1035 return f.endCurrentRow 1036 } 1037 1038 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) EndNFollowing() sql.Expression { 1039 return f.endNFollowing 1040 } 1041 1042 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) UnboundedFollowing() bool { 1043 return f.unboundedFollowing 1044 } 1045 1046 func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1047 return agg.NewRangeUnboundedPrecedingToUnboundedFollowingFramer(f, w) 1048 } 1049 1050 type RangeNPrecedingToNPrecedingFrame struct { 1051 windowFrameBase 1052 } 1053 1054 var _ sql.WindowFrame = (*RangeNPrecedingToNPrecedingFrame)(nil) 1055 1056 func NewRangeNPrecedingToNPrecedingFrame(startNPreceding sql.Expression, endNPreceding sql.Expression) *RangeNPrecedingToNPrecedingFrame { 1057 return &RangeNPrecedingToNPrecedingFrame{ 1058 windowFrameBase{ 1059 isRange: true, 1060 startNPreceding: startNPreceding, 1061 endNPreceding: endNPreceding, 1062 }, 1063 } 1064 } 1065 1066 func (f *RangeNPrecedingToNPrecedingFrame) UnboundedPreceding() bool { 1067 return f.unboundedPreceding 1068 } 1069 1070 func (f *RangeNPrecedingToNPrecedingFrame) StartNPreceding() sql.Expression { 1071 return f.startNPreceding 1072 } 1073 1074 func (f *RangeNPrecedingToNPrecedingFrame) StartCurrentRow() bool { 1075 return f.startCurrentRow 1076 } 1077 1078 func (f *RangeNPrecedingToNPrecedingFrame) StartNFollowing() sql.Expression { 1079 return f.startNFollowing 1080 } 1081 1082 func (f *RangeNPrecedingToNPrecedingFrame) EndNPreceding() sql.Expression { 1083 return f.endNPreceding 1084 } 1085 1086 func (f *RangeNPrecedingToNPrecedingFrame) EndCurrentRow() bool { 1087 return f.endCurrentRow 1088 } 1089 1090 func (f *RangeNPrecedingToNPrecedingFrame) EndNFollowing() sql.Expression { 1091 return f.endNFollowing 1092 } 1093 1094 func (f *RangeNPrecedingToNPrecedingFrame) UnboundedFollowing() bool { 1095 return f.unboundedFollowing 1096 } 1097 1098 func (f *RangeNPrecedingToNPrecedingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1099 return agg.NewRangeNPrecedingToNPrecedingFramer(f, w) 1100 } 1101 1102 type RangeNPrecedingToCurrentRowFrame struct { 1103 windowFrameBase 1104 } 1105 1106 var _ sql.WindowFrame = (*RangeNPrecedingToCurrentRowFrame)(nil) 1107 1108 func NewRangeNPrecedingToCurrentRowFrame(startNPreceding sql.Expression) *RangeNPrecedingToCurrentRowFrame { 1109 return &RangeNPrecedingToCurrentRowFrame{ 1110 windowFrameBase{ 1111 isRange: true, 1112 startNPreceding: startNPreceding, 1113 endCurrentRow: true, 1114 }, 1115 } 1116 } 1117 1118 func (f *RangeNPrecedingToCurrentRowFrame) UnboundedPreceding() bool { 1119 return f.unboundedPreceding 1120 } 1121 1122 func (f *RangeNPrecedingToCurrentRowFrame) StartNPreceding() sql.Expression { 1123 return f.startNPreceding 1124 } 1125 1126 func (f *RangeNPrecedingToCurrentRowFrame) StartCurrentRow() bool { 1127 return f.startCurrentRow 1128 } 1129 1130 func (f *RangeNPrecedingToCurrentRowFrame) StartNFollowing() sql.Expression { 1131 return f.startNFollowing 1132 } 1133 1134 func (f *RangeNPrecedingToCurrentRowFrame) EndNPreceding() sql.Expression { 1135 return f.endNPreceding 1136 } 1137 1138 func (f *RangeNPrecedingToCurrentRowFrame) EndCurrentRow() bool { 1139 return f.endCurrentRow 1140 } 1141 1142 func (f *RangeNPrecedingToCurrentRowFrame) EndNFollowing() sql.Expression { 1143 return f.endNFollowing 1144 } 1145 1146 func (f *RangeNPrecedingToCurrentRowFrame) UnboundedFollowing() bool { 1147 return f.unboundedFollowing 1148 } 1149 1150 func (f *RangeNPrecedingToCurrentRowFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1151 return agg.NewRangeNPrecedingToCurrentRowFramer(f, w) 1152 } 1153 1154 type RangeNPrecedingToNFollowingFrame struct { 1155 windowFrameBase 1156 } 1157 1158 var _ sql.WindowFrame = (*RangeNPrecedingToNFollowingFrame)(nil) 1159 1160 func NewRangeNPrecedingToNFollowingFrame(startNPreceding sql.Expression, endNFollowing sql.Expression) *RangeNPrecedingToNFollowingFrame { 1161 return &RangeNPrecedingToNFollowingFrame{ 1162 windowFrameBase{ 1163 isRange: true, 1164 startNPreceding: startNPreceding, 1165 endNFollowing: endNFollowing, 1166 }, 1167 } 1168 } 1169 1170 func (f *RangeNPrecedingToNFollowingFrame) UnboundedPreceding() bool { 1171 return f.unboundedPreceding 1172 } 1173 1174 func (f *RangeNPrecedingToNFollowingFrame) StartNPreceding() sql.Expression { 1175 return f.startNPreceding 1176 } 1177 1178 func (f *RangeNPrecedingToNFollowingFrame) StartCurrentRow() bool { 1179 return f.startCurrentRow 1180 } 1181 1182 func (f *RangeNPrecedingToNFollowingFrame) StartNFollowing() sql.Expression { 1183 return f.startNFollowing 1184 } 1185 1186 func (f *RangeNPrecedingToNFollowingFrame) EndNPreceding() sql.Expression { 1187 return f.endNPreceding 1188 } 1189 1190 func (f *RangeNPrecedingToNFollowingFrame) EndCurrentRow() bool { 1191 return f.endCurrentRow 1192 } 1193 1194 func (f *RangeNPrecedingToNFollowingFrame) EndNFollowing() sql.Expression { 1195 return f.endNFollowing 1196 } 1197 1198 func (f *RangeNPrecedingToNFollowingFrame) UnboundedFollowing() bool { 1199 return f.unboundedFollowing 1200 } 1201 1202 func (f *RangeNPrecedingToNFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1203 return agg.NewRangeNPrecedingToNFollowingFramer(f, w) 1204 } 1205 1206 type RangeNPrecedingToUnboundedFollowingFrame struct { 1207 windowFrameBase 1208 } 1209 1210 var _ sql.WindowFrame = (*RangeNPrecedingToUnboundedFollowingFrame)(nil) 1211 1212 func NewRangeNPrecedingToUnboundedFollowingFrame(startNPreceding sql.Expression) *RangeNPrecedingToUnboundedFollowingFrame { 1213 return &RangeNPrecedingToUnboundedFollowingFrame{ 1214 windowFrameBase{ 1215 isRange: true, 1216 startNPreceding: startNPreceding, 1217 unboundedFollowing: true, 1218 }, 1219 } 1220 } 1221 1222 func (f *RangeNPrecedingToUnboundedFollowingFrame) UnboundedPreceding() bool { 1223 return f.unboundedPreceding 1224 } 1225 1226 func (f *RangeNPrecedingToUnboundedFollowingFrame) StartNPreceding() sql.Expression { 1227 return f.startNPreceding 1228 } 1229 1230 func (f *RangeNPrecedingToUnboundedFollowingFrame) StartCurrentRow() bool { 1231 return f.startCurrentRow 1232 } 1233 1234 func (f *RangeNPrecedingToUnboundedFollowingFrame) StartNFollowing() sql.Expression { 1235 return f.startNFollowing 1236 } 1237 1238 func (f *RangeNPrecedingToUnboundedFollowingFrame) EndNPreceding() sql.Expression { 1239 return f.endNPreceding 1240 } 1241 1242 func (f *RangeNPrecedingToUnboundedFollowingFrame) EndCurrentRow() bool { 1243 return f.endCurrentRow 1244 } 1245 1246 func (f *RangeNPrecedingToUnboundedFollowingFrame) EndNFollowing() sql.Expression { 1247 return f.endNFollowing 1248 } 1249 1250 func (f *RangeNPrecedingToUnboundedFollowingFrame) UnboundedFollowing() bool { 1251 return f.unboundedFollowing 1252 } 1253 1254 func (f *RangeNPrecedingToUnboundedFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1255 return agg.NewRangeNPrecedingToUnboundedFollowingFramer(f, w) 1256 } 1257 1258 type RangeCurrentRowToNPrecedingFrame struct { 1259 windowFrameBase 1260 } 1261 1262 var _ sql.WindowFrame = (*RangeCurrentRowToNPrecedingFrame)(nil) 1263 1264 func NewRangeCurrentRowToNPrecedingFrame(endNPreceding sql.Expression) *RangeCurrentRowToNPrecedingFrame { 1265 return &RangeCurrentRowToNPrecedingFrame{ 1266 windowFrameBase{ 1267 isRange: true, 1268 startCurrentRow: true, 1269 endNPreceding: endNPreceding, 1270 }, 1271 } 1272 } 1273 1274 func (f *RangeCurrentRowToNPrecedingFrame) UnboundedPreceding() bool { 1275 return f.unboundedPreceding 1276 } 1277 1278 func (f *RangeCurrentRowToNPrecedingFrame) StartNPreceding() sql.Expression { 1279 return f.startNPreceding 1280 } 1281 1282 func (f *RangeCurrentRowToNPrecedingFrame) StartCurrentRow() bool { 1283 return f.startCurrentRow 1284 } 1285 1286 func (f *RangeCurrentRowToNPrecedingFrame) StartNFollowing() sql.Expression { 1287 return f.startNFollowing 1288 } 1289 1290 func (f *RangeCurrentRowToNPrecedingFrame) EndNPreceding() sql.Expression { 1291 return f.endNPreceding 1292 } 1293 1294 func (f *RangeCurrentRowToNPrecedingFrame) EndCurrentRow() bool { 1295 return f.endCurrentRow 1296 } 1297 1298 func (f *RangeCurrentRowToNPrecedingFrame) EndNFollowing() sql.Expression { 1299 return f.endNFollowing 1300 } 1301 1302 func (f *RangeCurrentRowToNPrecedingFrame) UnboundedFollowing() bool { 1303 return f.unboundedFollowing 1304 } 1305 1306 func (f *RangeCurrentRowToNPrecedingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1307 return agg.NewRangeCurrentRowToNPrecedingFramer(f, w) 1308 } 1309 1310 type RangeCurrentRowToCurrentRowFrame struct { 1311 windowFrameBase 1312 } 1313 1314 var _ sql.WindowFrame = (*RangeCurrentRowToCurrentRowFrame)(nil) 1315 1316 func NewRangeCurrentRowToCurrentRowFrame() *RangeCurrentRowToCurrentRowFrame { 1317 return &RangeCurrentRowToCurrentRowFrame{ 1318 windowFrameBase{ 1319 isRange: true, 1320 startCurrentRow: true, 1321 endCurrentRow: true, 1322 }, 1323 } 1324 } 1325 1326 func (f *RangeCurrentRowToCurrentRowFrame) UnboundedPreceding() bool { 1327 return f.unboundedPreceding 1328 } 1329 1330 func (f *RangeCurrentRowToCurrentRowFrame) StartNPreceding() sql.Expression { 1331 return f.startNPreceding 1332 } 1333 1334 func (f *RangeCurrentRowToCurrentRowFrame) StartCurrentRow() bool { 1335 return f.startCurrentRow 1336 } 1337 1338 func (f *RangeCurrentRowToCurrentRowFrame) StartNFollowing() sql.Expression { 1339 return f.startNFollowing 1340 } 1341 1342 func (f *RangeCurrentRowToCurrentRowFrame) EndNPreceding() sql.Expression { 1343 return f.endNPreceding 1344 } 1345 1346 func (f *RangeCurrentRowToCurrentRowFrame) EndCurrentRow() bool { 1347 return f.endCurrentRow 1348 } 1349 1350 func (f *RangeCurrentRowToCurrentRowFrame) EndNFollowing() sql.Expression { 1351 return f.endNFollowing 1352 } 1353 1354 func (f *RangeCurrentRowToCurrentRowFrame) UnboundedFollowing() bool { 1355 return f.unboundedFollowing 1356 } 1357 1358 func (f *RangeCurrentRowToCurrentRowFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1359 return agg.NewRangeCurrentRowToCurrentRowFramer(f, w) 1360 } 1361 1362 type RangeCurrentRowToNFollowingFrame struct { 1363 windowFrameBase 1364 } 1365 1366 var _ sql.WindowFrame = (*RangeCurrentRowToNFollowingFrame)(nil) 1367 1368 func NewRangeCurrentRowToNFollowingFrame(endNFollowing sql.Expression) *RangeCurrentRowToNFollowingFrame { 1369 return &RangeCurrentRowToNFollowingFrame{ 1370 windowFrameBase{ 1371 isRange: true, 1372 startCurrentRow: true, 1373 endNFollowing: endNFollowing, 1374 }, 1375 } 1376 } 1377 1378 func (f *RangeCurrentRowToNFollowingFrame) UnboundedPreceding() bool { 1379 return f.unboundedPreceding 1380 } 1381 1382 func (f *RangeCurrentRowToNFollowingFrame) StartNPreceding() sql.Expression { 1383 return f.startNPreceding 1384 } 1385 1386 func (f *RangeCurrentRowToNFollowingFrame) StartCurrentRow() bool { 1387 return f.startCurrentRow 1388 } 1389 1390 func (f *RangeCurrentRowToNFollowingFrame) StartNFollowing() sql.Expression { 1391 return f.startNFollowing 1392 } 1393 1394 func (f *RangeCurrentRowToNFollowingFrame) EndNPreceding() sql.Expression { 1395 return f.endNPreceding 1396 } 1397 1398 func (f *RangeCurrentRowToNFollowingFrame) EndCurrentRow() bool { 1399 return f.endCurrentRow 1400 } 1401 1402 func (f *RangeCurrentRowToNFollowingFrame) EndNFollowing() sql.Expression { 1403 return f.endNFollowing 1404 } 1405 1406 func (f *RangeCurrentRowToNFollowingFrame) UnboundedFollowing() bool { 1407 return f.unboundedFollowing 1408 } 1409 1410 func (f *RangeCurrentRowToNFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1411 return agg.NewRangeCurrentRowToNFollowingFramer(f, w) 1412 } 1413 1414 type RangeCurrentRowToUnboundedFollowingFrame struct { 1415 windowFrameBase 1416 } 1417 1418 var _ sql.WindowFrame = (*RangeCurrentRowToUnboundedFollowingFrame)(nil) 1419 1420 func NewRangeCurrentRowToUnboundedFollowingFrame() *RangeCurrentRowToUnboundedFollowingFrame { 1421 return &RangeCurrentRowToUnboundedFollowingFrame{ 1422 windowFrameBase{ 1423 isRange: true, 1424 startCurrentRow: true, 1425 unboundedFollowing: true, 1426 }, 1427 } 1428 } 1429 1430 func (f *RangeCurrentRowToUnboundedFollowingFrame) UnboundedPreceding() bool { 1431 return f.unboundedPreceding 1432 } 1433 1434 func (f *RangeCurrentRowToUnboundedFollowingFrame) StartNPreceding() sql.Expression { 1435 return f.startNPreceding 1436 } 1437 1438 func (f *RangeCurrentRowToUnboundedFollowingFrame) StartCurrentRow() bool { 1439 return f.startCurrentRow 1440 } 1441 1442 func (f *RangeCurrentRowToUnboundedFollowingFrame) StartNFollowing() sql.Expression { 1443 return f.startNFollowing 1444 } 1445 1446 func (f *RangeCurrentRowToUnboundedFollowingFrame) EndNPreceding() sql.Expression { 1447 return f.endNPreceding 1448 } 1449 1450 func (f *RangeCurrentRowToUnboundedFollowingFrame) EndCurrentRow() bool { 1451 return f.endCurrentRow 1452 } 1453 1454 func (f *RangeCurrentRowToUnboundedFollowingFrame) EndNFollowing() sql.Expression { 1455 return f.endNFollowing 1456 } 1457 1458 func (f *RangeCurrentRowToUnboundedFollowingFrame) UnboundedFollowing() bool { 1459 return f.unboundedFollowing 1460 } 1461 1462 func (f *RangeCurrentRowToUnboundedFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1463 return agg.NewRangeCurrentRowToUnboundedFollowingFramer(f, w) 1464 } 1465 1466 type RangeNFollowingToNPrecedingFrame struct { 1467 windowFrameBase 1468 } 1469 1470 var _ sql.WindowFrame = (*RangeNFollowingToNPrecedingFrame)(nil) 1471 1472 func NewRangeNFollowingToNPrecedingFrame(startNFollowing sql.Expression, endNPreceding sql.Expression) *RangeNFollowingToNPrecedingFrame { 1473 return &RangeNFollowingToNPrecedingFrame{ 1474 windowFrameBase{ 1475 isRange: true, 1476 startNFollowing: startNFollowing, 1477 endNPreceding: endNPreceding, 1478 }, 1479 } 1480 } 1481 1482 func (f *RangeNFollowingToNPrecedingFrame) UnboundedPreceding() bool { 1483 return f.unboundedPreceding 1484 } 1485 1486 func (f *RangeNFollowingToNPrecedingFrame) StartNPreceding() sql.Expression { 1487 return f.startNPreceding 1488 } 1489 1490 func (f *RangeNFollowingToNPrecedingFrame) StartCurrentRow() bool { 1491 return f.startCurrentRow 1492 } 1493 1494 func (f *RangeNFollowingToNPrecedingFrame) StartNFollowing() sql.Expression { 1495 return f.startNFollowing 1496 } 1497 1498 func (f *RangeNFollowingToNPrecedingFrame) EndNPreceding() sql.Expression { 1499 return f.endNPreceding 1500 } 1501 1502 func (f *RangeNFollowingToNPrecedingFrame) EndCurrentRow() bool { 1503 return f.endCurrentRow 1504 } 1505 1506 func (f *RangeNFollowingToNPrecedingFrame) EndNFollowing() sql.Expression { 1507 return f.endNFollowing 1508 } 1509 1510 func (f *RangeNFollowingToNPrecedingFrame) UnboundedFollowing() bool { 1511 return f.unboundedFollowing 1512 } 1513 1514 func (f *RangeNFollowingToNPrecedingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1515 return agg.NewRangeNFollowingToNPrecedingFramer(f, w) 1516 } 1517 1518 type RangeNFollowingToCurrentRowFrame struct { 1519 windowFrameBase 1520 } 1521 1522 var _ sql.WindowFrame = (*RangeNFollowingToCurrentRowFrame)(nil) 1523 1524 func NewRangeNFollowingToCurrentRowFrame(startNFollowing sql.Expression) *RangeNFollowingToCurrentRowFrame { 1525 return &RangeNFollowingToCurrentRowFrame{ 1526 windowFrameBase{ 1527 isRange: true, 1528 startNFollowing: startNFollowing, 1529 endCurrentRow: true, 1530 }, 1531 } 1532 } 1533 1534 func (f *RangeNFollowingToCurrentRowFrame) UnboundedPreceding() bool { 1535 return f.unboundedPreceding 1536 } 1537 1538 func (f *RangeNFollowingToCurrentRowFrame) StartNPreceding() sql.Expression { 1539 return f.startNPreceding 1540 } 1541 1542 func (f *RangeNFollowingToCurrentRowFrame) StartCurrentRow() bool { 1543 return f.startCurrentRow 1544 } 1545 1546 func (f *RangeNFollowingToCurrentRowFrame) StartNFollowing() sql.Expression { 1547 return f.startNFollowing 1548 } 1549 1550 func (f *RangeNFollowingToCurrentRowFrame) EndNPreceding() sql.Expression { 1551 return f.endNPreceding 1552 } 1553 1554 func (f *RangeNFollowingToCurrentRowFrame) EndCurrentRow() bool { 1555 return f.endCurrentRow 1556 } 1557 1558 func (f *RangeNFollowingToCurrentRowFrame) EndNFollowing() sql.Expression { 1559 return f.endNFollowing 1560 } 1561 1562 func (f *RangeNFollowingToCurrentRowFrame) UnboundedFollowing() bool { 1563 return f.unboundedFollowing 1564 } 1565 1566 func (f *RangeNFollowingToCurrentRowFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1567 return agg.NewRangeNFollowingToCurrentRowFramer(f, w) 1568 } 1569 1570 type RangeNFollowingToNFollowingFrame struct { 1571 windowFrameBase 1572 } 1573 1574 var _ sql.WindowFrame = (*RangeNFollowingToNFollowingFrame)(nil) 1575 1576 func NewRangeNFollowingToNFollowingFrame(startNFollowing sql.Expression, endNFollowing sql.Expression) *RangeNFollowingToNFollowingFrame { 1577 return &RangeNFollowingToNFollowingFrame{ 1578 windowFrameBase{ 1579 isRange: true, 1580 startNFollowing: startNFollowing, 1581 endNFollowing: endNFollowing, 1582 }, 1583 } 1584 } 1585 1586 func (f *RangeNFollowingToNFollowingFrame) UnboundedPreceding() bool { 1587 return f.unboundedPreceding 1588 } 1589 1590 func (f *RangeNFollowingToNFollowingFrame) StartNPreceding() sql.Expression { 1591 return f.startNPreceding 1592 } 1593 1594 func (f *RangeNFollowingToNFollowingFrame) StartCurrentRow() bool { 1595 return f.startCurrentRow 1596 } 1597 1598 func (f *RangeNFollowingToNFollowingFrame) StartNFollowing() sql.Expression { 1599 return f.startNFollowing 1600 } 1601 1602 func (f *RangeNFollowingToNFollowingFrame) EndNPreceding() sql.Expression { 1603 return f.endNPreceding 1604 } 1605 1606 func (f *RangeNFollowingToNFollowingFrame) EndCurrentRow() bool { 1607 return f.endCurrentRow 1608 } 1609 1610 func (f *RangeNFollowingToNFollowingFrame) EndNFollowing() sql.Expression { 1611 return f.endNFollowing 1612 } 1613 1614 func (f *RangeNFollowingToNFollowingFrame) UnboundedFollowing() bool { 1615 return f.unboundedFollowing 1616 } 1617 1618 func (f *RangeNFollowingToNFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1619 return agg.NewRangeNFollowingToNFollowingFramer(f, w) 1620 } 1621 1622 type RangeNFollowingToUnboundedFollowingFrame struct { 1623 windowFrameBase 1624 } 1625 1626 var _ sql.WindowFrame = (*RangeNFollowingToUnboundedFollowingFrame)(nil) 1627 1628 func NewRangeNFollowingToUnboundedFollowingFrame(startNFollowing sql.Expression) *RangeNFollowingToUnboundedFollowingFrame { 1629 return &RangeNFollowingToUnboundedFollowingFrame{ 1630 windowFrameBase{ 1631 isRange: true, 1632 startNFollowing: startNFollowing, 1633 unboundedFollowing: true, 1634 }, 1635 } 1636 } 1637 1638 func (f *RangeNFollowingToUnboundedFollowingFrame) UnboundedPreceding() bool { 1639 return f.unboundedPreceding 1640 } 1641 1642 func (f *RangeNFollowingToUnboundedFollowingFrame) StartNPreceding() sql.Expression { 1643 return f.startNPreceding 1644 } 1645 1646 func (f *RangeNFollowingToUnboundedFollowingFrame) StartCurrentRow() bool { 1647 return f.startCurrentRow 1648 } 1649 1650 func (f *RangeNFollowingToUnboundedFollowingFrame) StartNFollowing() sql.Expression { 1651 return f.startNFollowing 1652 } 1653 1654 func (f *RangeNFollowingToUnboundedFollowingFrame) EndNPreceding() sql.Expression { 1655 return f.endNPreceding 1656 } 1657 1658 func (f *RangeNFollowingToUnboundedFollowingFrame) EndCurrentRow() bool { 1659 return f.endCurrentRow 1660 } 1661 1662 func (f *RangeNFollowingToUnboundedFollowingFrame) EndNFollowing() sql.Expression { 1663 return f.endNFollowing 1664 } 1665 1666 func (f *RangeNFollowingToUnboundedFollowingFrame) UnboundedFollowing() bool { 1667 return f.unboundedFollowing 1668 } 1669 1670 func (f *RangeNFollowingToUnboundedFollowingFrame) NewFramer(w *sql.WindowDefinition) (sql.WindowFramer, error) { 1671 return agg.NewRangeNFollowingToUnboundedFollowingFramer(f, w) 1672 }