github.com/ydb-platform/ydb-go-sdk/v3@v3.89.2/trace/query_gtrace.go (about) 1 // Code generated by gtrace. DO NOT EDIT. 2 3 package trace 4 5 import ( 6 "context" 7 8 "github.com/ydb-platform/ydb-go-genproto/protos/Ydb_TableStats" 9 ) 10 11 // queryComposeOptions is a holder of options 12 type queryComposeOptions struct { 13 panicCallback func(e interface{}) 14 } 15 16 // QueryOption specified Query compose option 17 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 18 type QueryComposeOption func(o *queryComposeOptions) 19 20 // WithQueryPanicCallback specified behavior on panic 21 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 22 func WithQueryPanicCallback(cb func(e interface{})) QueryComposeOption { 23 return func(o *queryComposeOptions) { 24 o.panicCallback = cb 25 } 26 } 27 28 // Compose returns a new Query which has functional fields composed both from t and x. 29 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 30 func (t *Query) Compose(x *Query, opts ...QueryComposeOption) *Query { 31 if t == nil { 32 return x 33 } 34 var ret Query 35 options := queryComposeOptions{} 36 for _, opt := range opts { 37 if opt != nil { 38 opt(&options) 39 } 40 } 41 { 42 h1 := t.OnNew 43 h2 := x.OnNew 44 ret.OnNew = func(q QueryNewStartInfo) func(QueryNewDoneInfo) { 45 if options.panicCallback != nil { 46 defer func() { 47 if e := recover(); e != nil { 48 options.panicCallback(e) 49 } 50 }() 51 } 52 var r, r1 func(QueryNewDoneInfo) 53 if h1 != nil { 54 r = h1(q) 55 } 56 if h2 != nil { 57 r1 = h2(q) 58 } 59 return func(info QueryNewDoneInfo) { 60 if options.panicCallback != nil { 61 defer func() { 62 if e := recover(); e != nil { 63 options.panicCallback(e) 64 } 65 }() 66 } 67 if r != nil { 68 r(info) 69 } 70 if r1 != nil { 71 r1(info) 72 } 73 } 74 } 75 } 76 { 77 h1 := t.OnClose 78 h2 := x.OnClose 79 ret.OnClose = func(q QueryCloseStartInfo) func(QueryCloseDoneInfo) { 80 if options.panicCallback != nil { 81 defer func() { 82 if e := recover(); e != nil { 83 options.panicCallback(e) 84 } 85 }() 86 } 87 var r, r1 func(QueryCloseDoneInfo) 88 if h1 != nil { 89 r = h1(q) 90 } 91 if h2 != nil { 92 r1 = h2(q) 93 } 94 return func(info QueryCloseDoneInfo) { 95 if options.panicCallback != nil { 96 defer func() { 97 if e := recover(); e != nil { 98 options.panicCallback(e) 99 } 100 }() 101 } 102 if r != nil { 103 r(info) 104 } 105 if r1 != nil { 106 r1(info) 107 } 108 } 109 } 110 } 111 { 112 h1 := t.OnPoolNew 113 h2 := x.OnPoolNew 114 ret.OnPoolNew = func(q QueryPoolNewStartInfo) func(QueryPoolNewDoneInfo) { 115 if options.panicCallback != nil { 116 defer func() { 117 if e := recover(); e != nil { 118 options.panicCallback(e) 119 } 120 }() 121 } 122 var r, r1 func(QueryPoolNewDoneInfo) 123 if h1 != nil { 124 r = h1(q) 125 } 126 if h2 != nil { 127 r1 = h2(q) 128 } 129 return func(q QueryPoolNewDoneInfo) { 130 if options.panicCallback != nil { 131 defer func() { 132 if e := recover(); e != nil { 133 options.panicCallback(e) 134 } 135 }() 136 } 137 if r != nil { 138 r(q) 139 } 140 if r1 != nil { 141 r1(q) 142 } 143 } 144 } 145 } 146 { 147 h1 := t.OnPoolClose 148 h2 := x.OnPoolClose 149 ret.OnPoolClose = func(q QueryPoolCloseStartInfo) func(QueryPoolCloseDoneInfo) { 150 if options.panicCallback != nil { 151 defer func() { 152 if e := recover(); e != nil { 153 options.panicCallback(e) 154 } 155 }() 156 } 157 var r, r1 func(QueryPoolCloseDoneInfo) 158 if h1 != nil { 159 r = h1(q) 160 } 161 if h2 != nil { 162 r1 = h2(q) 163 } 164 return func(q QueryPoolCloseDoneInfo) { 165 if options.panicCallback != nil { 166 defer func() { 167 if e := recover(); e != nil { 168 options.panicCallback(e) 169 } 170 }() 171 } 172 if r != nil { 173 r(q) 174 } 175 if r1 != nil { 176 r1(q) 177 } 178 } 179 } 180 } 181 { 182 h1 := t.OnPoolTry 183 h2 := x.OnPoolTry 184 ret.OnPoolTry = func(q QueryPoolTryStartInfo) func(QueryPoolTryDoneInfo) { 185 if options.panicCallback != nil { 186 defer func() { 187 if e := recover(); e != nil { 188 options.panicCallback(e) 189 } 190 }() 191 } 192 var r, r1 func(QueryPoolTryDoneInfo) 193 if h1 != nil { 194 r = h1(q) 195 } 196 if h2 != nil { 197 r1 = h2(q) 198 } 199 return func(q QueryPoolTryDoneInfo) { 200 if options.panicCallback != nil { 201 defer func() { 202 if e := recover(); e != nil { 203 options.panicCallback(e) 204 } 205 }() 206 } 207 if r != nil { 208 r(q) 209 } 210 if r1 != nil { 211 r1(q) 212 } 213 } 214 } 215 } 216 { 217 h1 := t.OnPoolWith 218 h2 := x.OnPoolWith 219 ret.OnPoolWith = func(q QueryPoolWithStartInfo) func(QueryPoolWithDoneInfo) { 220 if options.panicCallback != nil { 221 defer func() { 222 if e := recover(); e != nil { 223 options.panicCallback(e) 224 } 225 }() 226 } 227 var r, r1 func(QueryPoolWithDoneInfo) 228 if h1 != nil { 229 r = h1(q) 230 } 231 if h2 != nil { 232 r1 = h2(q) 233 } 234 return func(q QueryPoolWithDoneInfo) { 235 if options.panicCallback != nil { 236 defer func() { 237 if e := recover(); e != nil { 238 options.panicCallback(e) 239 } 240 }() 241 } 242 if r != nil { 243 r(q) 244 } 245 if r1 != nil { 246 r1(q) 247 } 248 } 249 } 250 } 251 { 252 h1 := t.OnPoolPut 253 h2 := x.OnPoolPut 254 ret.OnPoolPut = func(q QueryPoolPutStartInfo) func(QueryPoolPutDoneInfo) { 255 if options.panicCallback != nil { 256 defer func() { 257 if e := recover(); e != nil { 258 options.panicCallback(e) 259 } 260 }() 261 } 262 var r, r1 func(QueryPoolPutDoneInfo) 263 if h1 != nil { 264 r = h1(q) 265 } 266 if h2 != nil { 267 r1 = h2(q) 268 } 269 return func(q QueryPoolPutDoneInfo) { 270 if options.panicCallback != nil { 271 defer func() { 272 if e := recover(); e != nil { 273 options.panicCallback(e) 274 } 275 }() 276 } 277 if r != nil { 278 r(q) 279 } 280 if r1 != nil { 281 r1(q) 282 } 283 } 284 } 285 } 286 { 287 h1 := t.OnPoolGet 288 h2 := x.OnPoolGet 289 ret.OnPoolGet = func(q QueryPoolGetStartInfo) func(QueryPoolGetDoneInfo) { 290 if options.panicCallback != nil { 291 defer func() { 292 if e := recover(); e != nil { 293 options.panicCallback(e) 294 } 295 }() 296 } 297 var r, r1 func(QueryPoolGetDoneInfo) 298 if h1 != nil { 299 r = h1(q) 300 } 301 if h2 != nil { 302 r1 = h2(q) 303 } 304 return func(q QueryPoolGetDoneInfo) { 305 if options.panicCallback != nil { 306 defer func() { 307 if e := recover(); e != nil { 308 options.panicCallback(e) 309 } 310 }() 311 } 312 if r != nil { 313 r(q) 314 } 315 if r1 != nil { 316 r1(q) 317 } 318 } 319 } 320 } 321 { 322 h1 := t.OnPoolChange 323 h2 := x.OnPoolChange 324 ret.OnPoolChange = func(q QueryPoolChange) { 325 if options.panicCallback != nil { 326 defer func() { 327 if e := recover(); e != nil { 328 options.panicCallback(e) 329 } 330 }() 331 } 332 if h1 != nil { 333 h1(q) 334 } 335 if h2 != nil { 336 h2(q) 337 } 338 } 339 } 340 { 341 h1 := t.OnDo 342 h2 := x.OnDo 343 ret.OnDo = func(q QueryDoStartInfo) func(QueryDoDoneInfo) { 344 if options.panicCallback != nil { 345 defer func() { 346 if e := recover(); e != nil { 347 options.panicCallback(e) 348 } 349 }() 350 } 351 var r, r1 func(QueryDoDoneInfo) 352 if h1 != nil { 353 r = h1(q) 354 } 355 if h2 != nil { 356 r1 = h2(q) 357 } 358 return func(q QueryDoDoneInfo) { 359 if options.panicCallback != nil { 360 defer func() { 361 if e := recover(); e != nil { 362 options.panicCallback(e) 363 } 364 }() 365 } 366 if r != nil { 367 r(q) 368 } 369 if r1 != nil { 370 r1(q) 371 } 372 } 373 } 374 } 375 { 376 h1 := t.OnDoTx 377 h2 := x.OnDoTx 378 ret.OnDoTx = func(q QueryDoTxStartInfo) func(QueryDoTxDoneInfo) { 379 if options.panicCallback != nil { 380 defer func() { 381 if e := recover(); e != nil { 382 options.panicCallback(e) 383 } 384 }() 385 } 386 var r, r1 func(QueryDoTxDoneInfo) 387 if h1 != nil { 388 r = h1(q) 389 } 390 if h2 != nil { 391 r1 = h2(q) 392 } 393 return func(q QueryDoTxDoneInfo) { 394 if options.panicCallback != nil { 395 defer func() { 396 if e := recover(); e != nil { 397 options.panicCallback(e) 398 } 399 }() 400 } 401 if r != nil { 402 r(q) 403 } 404 if r1 != nil { 405 r1(q) 406 } 407 } 408 } 409 } 410 { 411 h1 := t.OnExec 412 h2 := x.OnExec 413 ret.OnExec = func(q QueryExecStartInfo) func(QueryExecDoneInfo) { 414 if options.panicCallback != nil { 415 defer func() { 416 if e := recover(); e != nil { 417 options.panicCallback(e) 418 } 419 }() 420 } 421 var r, r1 func(QueryExecDoneInfo) 422 if h1 != nil { 423 r = h1(q) 424 } 425 if h2 != nil { 426 r1 = h2(q) 427 } 428 return func(q QueryExecDoneInfo) { 429 if options.panicCallback != nil { 430 defer func() { 431 if e := recover(); e != nil { 432 options.panicCallback(e) 433 } 434 }() 435 } 436 if r != nil { 437 r(q) 438 } 439 if r1 != nil { 440 r1(q) 441 } 442 } 443 } 444 } 445 { 446 h1 := t.OnQuery 447 h2 := x.OnQuery 448 ret.OnQuery = func(q QueryQueryStartInfo) func(QueryQueryDoneInfo) { 449 if options.panicCallback != nil { 450 defer func() { 451 if e := recover(); e != nil { 452 options.panicCallback(e) 453 } 454 }() 455 } 456 var r, r1 func(QueryQueryDoneInfo) 457 if h1 != nil { 458 r = h1(q) 459 } 460 if h2 != nil { 461 r1 = h2(q) 462 } 463 return func(q QueryQueryDoneInfo) { 464 if options.panicCallback != nil { 465 defer func() { 466 if e := recover(); e != nil { 467 options.panicCallback(e) 468 } 469 }() 470 } 471 if r != nil { 472 r(q) 473 } 474 if r1 != nil { 475 r1(q) 476 } 477 } 478 } 479 } 480 { 481 h1 := t.OnQueryResultSet 482 h2 := x.OnQueryResultSet 483 ret.OnQueryResultSet = func(q QueryQueryResultSetStartInfo) func(QueryQueryResultSetDoneInfo) { 484 if options.panicCallback != nil { 485 defer func() { 486 if e := recover(); e != nil { 487 options.panicCallback(e) 488 } 489 }() 490 } 491 var r, r1 func(QueryQueryResultSetDoneInfo) 492 if h1 != nil { 493 r = h1(q) 494 } 495 if h2 != nil { 496 r1 = h2(q) 497 } 498 return func(q QueryQueryResultSetDoneInfo) { 499 if options.panicCallback != nil { 500 defer func() { 501 if e := recover(); e != nil { 502 options.panicCallback(e) 503 } 504 }() 505 } 506 if r != nil { 507 r(q) 508 } 509 if r1 != nil { 510 r1(q) 511 } 512 } 513 } 514 } 515 { 516 h1 := t.OnQueryRow 517 h2 := x.OnQueryRow 518 ret.OnQueryRow = func(q QueryQueryRowStartInfo) func(QueryQueryRowDoneInfo) { 519 if options.panicCallback != nil { 520 defer func() { 521 if e := recover(); e != nil { 522 options.panicCallback(e) 523 } 524 }() 525 } 526 var r, r1 func(QueryQueryRowDoneInfo) 527 if h1 != nil { 528 r = h1(q) 529 } 530 if h2 != nil { 531 r1 = h2(q) 532 } 533 return func(q QueryQueryRowDoneInfo) { 534 if options.panicCallback != nil { 535 defer func() { 536 if e := recover(); e != nil { 537 options.panicCallback(e) 538 } 539 }() 540 } 541 if r != nil { 542 r(q) 543 } 544 if r1 != nil { 545 r1(q) 546 } 547 } 548 } 549 } 550 { 551 h1 := t.OnSessionCreate 552 h2 := x.OnSessionCreate 553 ret.OnSessionCreate = func(q QuerySessionCreateStartInfo) func(QuerySessionCreateDoneInfo) { 554 if options.panicCallback != nil { 555 defer func() { 556 if e := recover(); e != nil { 557 options.panicCallback(e) 558 } 559 }() 560 } 561 var r, r1 func(QuerySessionCreateDoneInfo) 562 if h1 != nil { 563 r = h1(q) 564 } 565 if h2 != nil { 566 r1 = h2(q) 567 } 568 return func(info QuerySessionCreateDoneInfo) { 569 if options.panicCallback != nil { 570 defer func() { 571 if e := recover(); e != nil { 572 options.panicCallback(e) 573 } 574 }() 575 } 576 if r != nil { 577 r(info) 578 } 579 if r1 != nil { 580 r1(info) 581 } 582 } 583 } 584 } 585 { 586 h1 := t.OnSessionAttach 587 h2 := x.OnSessionAttach 588 ret.OnSessionAttach = func(q QuerySessionAttachStartInfo) func(QuerySessionAttachDoneInfo) { 589 if options.panicCallback != nil { 590 defer func() { 591 if e := recover(); e != nil { 592 options.panicCallback(e) 593 } 594 }() 595 } 596 var r, r1 func(QuerySessionAttachDoneInfo) 597 if h1 != nil { 598 r = h1(q) 599 } 600 if h2 != nil { 601 r1 = h2(q) 602 } 603 return func(info QuerySessionAttachDoneInfo) { 604 if options.panicCallback != nil { 605 defer func() { 606 if e := recover(); e != nil { 607 options.panicCallback(e) 608 } 609 }() 610 } 611 if r != nil { 612 r(info) 613 } 614 if r1 != nil { 615 r1(info) 616 } 617 } 618 } 619 } 620 { 621 h1 := t.OnSessionDelete 622 h2 := x.OnSessionDelete 623 ret.OnSessionDelete = func(q QuerySessionDeleteStartInfo) func(QuerySessionDeleteDoneInfo) { 624 if options.panicCallback != nil { 625 defer func() { 626 if e := recover(); e != nil { 627 options.panicCallback(e) 628 } 629 }() 630 } 631 var r, r1 func(QuerySessionDeleteDoneInfo) 632 if h1 != nil { 633 r = h1(q) 634 } 635 if h2 != nil { 636 r1 = h2(q) 637 } 638 return func(info QuerySessionDeleteDoneInfo) { 639 if options.panicCallback != nil { 640 defer func() { 641 if e := recover(); e != nil { 642 options.panicCallback(e) 643 } 644 }() 645 } 646 if r != nil { 647 r(info) 648 } 649 if r1 != nil { 650 r1(info) 651 } 652 } 653 } 654 } 655 { 656 h1 := t.OnSessionExec 657 h2 := x.OnSessionExec 658 ret.OnSessionExec = func(q QuerySessionExecStartInfo) func(QuerySessionExecDoneInfo) { 659 if options.panicCallback != nil { 660 defer func() { 661 if e := recover(); e != nil { 662 options.panicCallback(e) 663 } 664 }() 665 } 666 var r, r1 func(QuerySessionExecDoneInfo) 667 if h1 != nil { 668 r = h1(q) 669 } 670 if h2 != nil { 671 r1 = h2(q) 672 } 673 return func(info QuerySessionExecDoneInfo) { 674 if options.panicCallback != nil { 675 defer func() { 676 if e := recover(); e != nil { 677 options.panicCallback(e) 678 } 679 }() 680 } 681 if r != nil { 682 r(info) 683 } 684 if r1 != nil { 685 r1(info) 686 } 687 } 688 } 689 } 690 { 691 h1 := t.OnSessionQuery 692 h2 := x.OnSessionQuery 693 ret.OnSessionQuery = func(q QuerySessionQueryStartInfo) func(QuerySessionQueryDoneInfo) { 694 if options.panicCallback != nil { 695 defer func() { 696 if e := recover(); e != nil { 697 options.panicCallback(e) 698 } 699 }() 700 } 701 var r, r1 func(QuerySessionQueryDoneInfo) 702 if h1 != nil { 703 r = h1(q) 704 } 705 if h2 != nil { 706 r1 = h2(q) 707 } 708 return func(info QuerySessionQueryDoneInfo) { 709 if options.panicCallback != nil { 710 defer func() { 711 if e := recover(); e != nil { 712 options.panicCallback(e) 713 } 714 }() 715 } 716 if r != nil { 717 r(info) 718 } 719 if r1 != nil { 720 r1(info) 721 } 722 } 723 } 724 } 725 { 726 h1 := t.OnSessionQueryResultSet 727 h2 := x.OnSessionQueryResultSet 728 ret.OnSessionQueryResultSet = func(q QuerySessionQueryResultSetStartInfo) func(QuerySessionQueryResultSetDoneInfo) { 729 if options.panicCallback != nil { 730 defer func() { 731 if e := recover(); e != nil { 732 options.panicCallback(e) 733 } 734 }() 735 } 736 var r, r1 func(QuerySessionQueryResultSetDoneInfo) 737 if h1 != nil { 738 r = h1(q) 739 } 740 if h2 != nil { 741 r1 = h2(q) 742 } 743 return func(q QuerySessionQueryResultSetDoneInfo) { 744 if options.panicCallback != nil { 745 defer func() { 746 if e := recover(); e != nil { 747 options.panicCallback(e) 748 } 749 }() 750 } 751 if r != nil { 752 r(q) 753 } 754 if r1 != nil { 755 r1(q) 756 } 757 } 758 } 759 } 760 { 761 h1 := t.OnSessionQueryRow 762 h2 := x.OnSessionQueryRow 763 ret.OnSessionQueryRow = func(q QuerySessionQueryRowStartInfo) func(QuerySessionQueryRowDoneInfo) { 764 if options.panicCallback != nil { 765 defer func() { 766 if e := recover(); e != nil { 767 options.panicCallback(e) 768 } 769 }() 770 } 771 var r, r1 func(QuerySessionQueryRowDoneInfo) 772 if h1 != nil { 773 r = h1(q) 774 } 775 if h2 != nil { 776 r1 = h2(q) 777 } 778 return func(q QuerySessionQueryRowDoneInfo) { 779 if options.panicCallback != nil { 780 defer func() { 781 if e := recover(); e != nil { 782 options.panicCallback(e) 783 } 784 }() 785 } 786 if r != nil { 787 r(q) 788 } 789 if r1 != nil { 790 r1(q) 791 } 792 } 793 } 794 } 795 { 796 h1 := t.OnSessionBegin 797 h2 := x.OnSessionBegin 798 ret.OnSessionBegin = func(q QuerySessionBeginStartInfo) func(QuerySessionBeginDoneInfo) { 799 if options.panicCallback != nil { 800 defer func() { 801 if e := recover(); e != nil { 802 options.panicCallback(e) 803 } 804 }() 805 } 806 var r, r1 func(QuerySessionBeginDoneInfo) 807 if h1 != nil { 808 r = h1(q) 809 } 810 if h2 != nil { 811 r1 = h2(q) 812 } 813 return func(info QuerySessionBeginDoneInfo) { 814 if options.panicCallback != nil { 815 defer func() { 816 if e := recover(); e != nil { 817 options.panicCallback(e) 818 } 819 }() 820 } 821 if r != nil { 822 r(info) 823 } 824 if r1 != nil { 825 r1(info) 826 } 827 } 828 } 829 } 830 { 831 h1 := t.OnTxExec 832 h2 := x.OnTxExec 833 ret.OnTxExec = func(q QueryTxExecStartInfo) func(QueryTxExecDoneInfo) { 834 if options.panicCallback != nil { 835 defer func() { 836 if e := recover(); e != nil { 837 options.panicCallback(e) 838 } 839 }() 840 } 841 var r, r1 func(QueryTxExecDoneInfo) 842 if h1 != nil { 843 r = h1(q) 844 } 845 if h2 != nil { 846 r1 = h2(q) 847 } 848 return func(info QueryTxExecDoneInfo) { 849 if options.panicCallback != nil { 850 defer func() { 851 if e := recover(); e != nil { 852 options.panicCallback(e) 853 } 854 }() 855 } 856 if r != nil { 857 r(info) 858 } 859 if r1 != nil { 860 r1(info) 861 } 862 } 863 } 864 } 865 { 866 h1 := t.OnTxQuery 867 h2 := x.OnTxQuery 868 ret.OnTxQuery = func(q QueryTxQueryStartInfo) func(QueryTxQueryDoneInfo) { 869 if options.panicCallback != nil { 870 defer func() { 871 if e := recover(); e != nil { 872 options.panicCallback(e) 873 } 874 }() 875 } 876 var r, r1 func(QueryTxQueryDoneInfo) 877 if h1 != nil { 878 r = h1(q) 879 } 880 if h2 != nil { 881 r1 = h2(q) 882 } 883 return func(info QueryTxQueryDoneInfo) { 884 if options.panicCallback != nil { 885 defer func() { 886 if e := recover(); e != nil { 887 options.panicCallback(e) 888 } 889 }() 890 } 891 if r != nil { 892 r(info) 893 } 894 if r1 != nil { 895 r1(info) 896 } 897 } 898 } 899 } 900 { 901 h1 := t.OnTxQueryResultSet 902 h2 := x.OnTxQueryResultSet 903 ret.OnTxQueryResultSet = func(q QueryTxQueryResultSetStartInfo) func(QueryTxQueryResultSetDoneInfo) { 904 if options.panicCallback != nil { 905 defer func() { 906 if e := recover(); e != nil { 907 options.panicCallback(e) 908 } 909 }() 910 } 911 var r, r1 func(QueryTxQueryResultSetDoneInfo) 912 if h1 != nil { 913 r = h1(q) 914 } 915 if h2 != nil { 916 r1 = h2(q) 917 } 918 return func(q QueryTxQueryResultSetDoneInfo) { 919 if options.panicCallback != nil { 920 defer func() { 921 if e := recover(); e != nil { 922 options.panicCallback(e) 923 } 924 }() 925 } 926 if r != nil { 927 r(q) 928 } 929 if r1 != nil { 930 r1(q) 931 } 932 } 933 } 934 } 935 { 936 h1 := t.OnTxQueryRow 937 h2 := x.OnTxQueryRow 938 ret.OnTxQueryRow = func(q QueryTxQueryRowStartInfo) func(QueryTxQueryRowDoneInfo) { 939 if options.panicCallback != nil { 940 defer func() { 941 if e := recover(); e != nil { 942 options.panicCallback(e) 943 } 944 }() 945 } 946 var r, r1 func(QueryTxQueryRowDoneInfo) 947 if h1 != nil { 948 r = h1(q) 949 } 950 if h2 != nil { 951 r1 = h2(q) 952 } 953 return func(q QueryTxQueryRowDoneInfo) { 954 if options.panicCallback != nil { 955 defer func() { 956 if e := recover(); e != nil { 957 options.panicCallback(e) 958 } 959 }() 960 } 961 if r != nil { 962 r(q) 963 } 964 if r1 != nil { 965 r1(q) 966 } 967 } 968 } 969 } 970 { 971 h1 := t.OnResultNew 972 h2 := x.OnResultNew 973 ret.OnResultNew = func(q QueryResultNewStartInfo) func(QueryResultNewDoneInfo) { 974 if options.panicCallback != nil { 975 defer func() { 976 if e := recover(); e != nil { 977 options.panicCallback(e) 978 } 979 }() 980 } 981 var r, r1 func(QueryResultNewDoneInfo) 982 if h1 != nil { 983 r = h1(q) 984 } 985 if h2 != nil { 986 r1 = h2(q) 987 } 988 return func(info QueryResultNewDoneInfo) { 989 if options.panicCallback != nil { 990 defer func() { 991 if e := recover(); e != nil { 992 options.panicCallback(e) 993 } 994 }() 995 } 996 if r != nil { 997 r(info) 998 } 999 if r1 != nil { 1000 r1(info) 1001 } 1002 } 1003 } 1004 } 1005 { 1006 h1 := t.OnResultNextPart 1007 h2 := x.OnResultNextPart 1008 ret.OnResultNextPart = func(q QueryResultNextPartStartInfo) func(QueryResultNextPartDoneInfo) { 1009 if options.panicCallback != nil { 1010 defer func() { 1011 if e := recover(); e != nil { 1012 options.panicCallback(e) 1013 } 1014 }() 1015 } 1016 var r, r1 func(QueryResultNextPartDoneInfo) 1017 if h1 != nil { 1018 r = h1(q) 1019 } 1020 if h2 != nil { 1021 r1 = h2(q) 1022 } 1023 return func(info QueryResultNextPartDoneInfo) { 1024 if options.panicCallback != nil { 1025 defer func() { 1026 if e := recover(); e != nil { 1027 options.panicCallback(e) 1028 } 1029 }() 1030 } 1031 if r != nil { 1032 r(info) 1033 } 1034 if r1 != nil { 1035 r1(info) 1036 } 1037 } 1038 } 1039 } 1040 { 1041 h1 := t.OnResultNextResultSet 1042 h2 := x.OnResultNextResultSet 1043 ret.OnResultNextResultSet = func(q QueryResultNextResultSetStartInfo) func(QueryResultNextResultSetDoneInfo) { 1044 if options.panicCallback != nil { 1045 defer func() { 1046 if e := recover(); e != nil { 1047 options.panicCallback(e) 1048 } 1049 }() 1050 } 1051 var r, r1 func(QueryResultNextResultSetDoneInfo) 1052 if h1 != nil { 1053 r = h1(q) 1054 } 1055 if h2 != nil { 1056 r1 = h2(q) 1057 } 1058 return func(info QueryResultNextResultSetDoneInfo) { 1059 if options.panicCallback != nil { 1060 defer func() { 1061 if e := recover(); e != nil { 1062 options.panicCallback(e) 1063 } 1064 }() 1065 } 1066 if r != nil { 1067 r(info) 1068 } 1069 if r1 != nil { 1070 r1(info) 1071 } 1072 } 1073 } 1074 } 1075 { 1076 h1 := t.OnResultClose 1077 h2 := x.OnResultClose 1078 ret.OnResultClose = func(q QueryResultCloseStartInfo) func(QueryResultCloseDoneInfo) { 1079 if options.panicCallback != nil { 1080 defer func() { 1081 if e := recover(); e != nil { 1082 options.panicCallback(e) 1083 } 1084 }() 1085 } 1086 var r, r1 func(QueryResultCloseDoneInfo) 1087 if h1 != nil { 1088 r = h1(q) 1089 } 1090 if h2 != nil { 1091 r1 = h2(q) 1092 } 1093 return func(info QueryResultCloseDoneInfo) { 1094 if options.panicCallback != nil { 1095 defer func() { 1096 if e := recover(); e != nil { 1097 options.panicCallback(e) 1098 } 1099 }() 1100 } 1101 if r != nil { 1102 r(info) 1103 } 1104 if r1 != nil { 1105 r1(info) 1106 } 1107 } 1108 } 1109 } 1110 return &ret 1111 } 1112 func (t *Query) onNew(q QueryNewStartInfo) func(info QueryNewDoneInfo) { 1113 fn := t.OnNew 1114 if fn == nil { 1115 return func(QueryNewDoneInfo) { 1116 return 1117 } 1118 } 1119 res := fn(q) 1120 if res == nil { 1121 return func(QueryNewDoneInfo) { 1122 return 1123 } 1124 } 1125 return res 1126 } 1127 func (t *Query) onClose(q QueryCloseStartInfo) func(info QueryCloseDoneInfo) { 1128 fn := t.OnClose 1129 if fn == nil { 1130 return func(QueryCloseDoneInfo) { 1131 return 1132 } 1133 } 1134 res := fn(q) 1135 if res == nil { 1136 return func(QueryCloseDoneInfo) { 1137 return 1138 } 1139 } 1140 return res 1141 } 1142 func (t *Query) onPoolNew(q QueryPoolNewStartInfo) func(QueryPoolNewDoneInfo) { 1143 fn := t.OnPoolNew 1144 if fn == nil { 1145 return func(QueryPoolNewDoneInfo) { 1146 return 1147 } 1148 } 1149 res := fn(q) 1150 if res == nil { 1151 return func(QueryPoolNewDoneInfo) { 1152 return 1153 } 1154 } 1155 return res 1156 } 1157 func (t *Query) onPoolClose(q QueryPoolCloseStartInfo) func(QueryPoolCloseDoneInfo) { 1158 fn := t.OnPoolClose 1159 if fn == nil { 1160 return func(QueryPoolCloseDoneInfo) { 1161 return 1162 } 1163 } 1164 res := fn(q) 1165 if res == nil { 1166 return func(QueryPoolCloseDoneInfo) { 1167 return 1168 } 1169 } 1170 return res 1171 } 1172 func (t *Query) onPoolTry(q QueryPoolTryStartInfo) func(QueryPoolTryDoneInfo) { 1173 fn := t.OnPoolTry 1174 if fn == nil { 1175 return func(QueryPoolTryDoneInfo) { 1176 return 1177 } 1178 } 1179 res := fn(q) 1180 if res == nil { 1181 return func(QueryPoolTryDoneInfo) { 1182 return 1183 } 1184 } 1185 return res 1186 } 1187 func (t *Query) onPoolWith(q QueryPoolWithStartInfo) func(QueryPoolWithDoneInfo) { 1188 fn := t.OnPoolWith 1189 if fn == nil { 1190 return func(QueryPoolWithDoneInfo) { 1191 return 1192 } 1193 } 1194 res := fn(q) 1195 if res == nil { 1196 return func(QueryPoolWithDoneInfo) { 1197 return 1198 } 1199 } 1200 return res 1201 } 1202 func (t *Query) onPoolPut(q QueryPoolPutStartInfo) func(QueryPoolPutDoneInfo) { 1203 fn := t.OnPoolPut 1204 if fn == nil { 1205 return func(QueryPoolPutDoneInfo) { 1206 return 1207 } 1208 } 1209 res := fn(q) 1210 if res == nil { 1211 return func(QueryPoolPutDoneInfo) { 1212 return 1213 } 1214 } 1215 return res 1216 } 1217 func (t *Query) onPoolGet(q QueryPoolGetStartInfo) func(QueryPoolGetDoneInfo) { 1218 fn := t.OnPoolGet 1219 if fn == nil { 1220 return func(QueryPoolGetDoneInfo) { 1221 return 1222 } 1223 } 1224 res := fn(q) 1225 if res == nil { 1226 return func(QueryPoolGetDoneInfo) { 1227 return 1228 } 1229 } 1230 return res 1231 } 1232 func (t *Query) onPoolChange(q QueryPoolChange) { 1233 fn := t.OnPoolChange 1234 if fn == nil { 1235 return 1236 } 1237 fn(q) 1238 } 1239 func (t *Query) onDo(q QueryDoStartInfo) func(QueryDoDoneInfo) { 1240 fn := t.OnDo 1241 if fn == nil { 1242 return func(QueryDoDoneInfo) { 1243 return 1244 } 1245 } 1246 res := fn(q) 1247 if res == nil { 1248 return func(QueryDoDoneInfo) { 1249 return 1250 } 1251 } 1252 return res 1253 } 1254 func (t *Query) onDoTx(q QueryDoTxStartInfo) func(QueryDoTxDoneInfo) { 1255 fn := t.OnDoTx 1256 if fn == nil { 1257 return func(QueryDoTxDoneInfo) { 1258 return 1259 } 1260 } 1261 res := fn(q) 1262 if res == nil { 1263 return func(QueryDoTxDoneInfo) { 1264 return 1265 } 1266 } 1267 return res 1268 } 1269 func (t *Query) onExec(q QueryExecStartInfo) func(QueryExecDoneInfo) { 1270 fn := t.OnExec 1271 if fn == nil { 1272 return func(QueryExecDoneInfo) { 1273 return 1274 } 1275 } 1276 res := fn(q) 1277 if res == nil { 1278 return func(QueryExecDoneInfo) { 1279 return 1280 } 1281 } 1282 return res 1283 } 1284 func (t *Query) onQuery(q QueryQueryStartInfo) func(QueryQueryDoneInfo) { 1285 fn := t.OnQuery 1286 if fn == nil { 1287 return func(QueryQueryDoneInfo) { 1288 return 1289 } 1290 } 1291 res := fn(q) 1292 if res == nil { 1293 return func(QueryQueryDoneInfo) { 1294 return 1295 } 1296 } 1297 return res 1298 } 1299 func (t *Query) onQueryResultSet(q QueryQueryResultSetStartInfo) func(QueryQueryResultSetDoneInfo) { 1300 fn := t.OnQueryResultSet 1301 if fn == nil { 1302 return func(QueryQueryResultSetDoneInfo) { 1303 return 1304 } 1305 } 1306 res := fn(q) 1307 if res == nil { 1308 return func(QueryQueryResultSetDoneInfo) { 1309 return 1310 } 1311 } 1312 return res 1313 } 1314 func (t *Query) onQueryRow(q QueryQueryRowStartInfo) func(QueryQueryRowDoneInfo) { 1315 fn := t.OnQueryRow 1316 if fn == nil { 1317 return func(QueryQueryRowDoneInfo) { 1318 return 1319 } 1320 } 1321 res := fn(q) 1322 if res == nil { 1323 return func(QueryQueryRowDoneInfo) { 1324 return 1325 } 1326 } 1327 return res 1328 } 1329 func (t *Query) onSessionCreate(q QuerySessionCreateStartInfo) func(info QuerySessionCreateDoneInfo) { 1330 fn := t.OnSessionCreate 1331 if fn == nil { 1332 return func(QuerySessionCreateDoneInfo) { 1333 return 1334 } 1335 } 1336 res := fn(q) 1337 if res == nil { 1338 return func(QuerySessionCreateDoneInfo) { 1339 return 1340 } 1341 } 1342 return res 1343 } 1344 func (t *Query) onSessionAttach(q QuerySessionAttachStartInfo) func(info QuerySessionAttachDoneInfo) { 1345 fn := t.OnSessionAttach 1346 if fn == nil { 1347 return func(QuerySessionAttachDoneInfo) { 1348 return 1349 } 1350 } 1351 res := fn(q) 1352 if res == nil { 1353 return func(QuerySessionAttachDoneInfo) { 1354 return 1355 } 1356 } 1357 return res 1358 } 1359 func (t *Query) onSessionDelete(q QuerySessionDeleteStartInfo) func(info QuerySessionDeleteDoneInfo) { 1360 fn := t.OnSessionDelete 1361 if fn == nil { 1362 return func(QuerySessionDeleteDoneInfo) { 1363 return 1364 } 1365 } 1366 res := fn(q) 1367 if res == nil { 1368 return func(QuerySessionDeleteDoneInfo) { 1369 return 1370 } 1371 } 1372 return res 1373 } 1374 func (t *Query) onSessionExec(q QuerySessionExecStartInfo) func(info QuerySessionExecDoneInfo) { 1375 fn := t.OnSessionExec 1376 if fn == nil { 1377 return func(QuerySessionExecDoneInfo) { 1378 return 1379 } 1380 } 1381 res := fn(q) 1382 if res == nil { 1383 return func(QuerySessionExecDoneInfo) { 1384 return 1385 } 1386 } 1387 return res 1388 } 1389 func (t *Query) onSessionQuery(q QuerySessionQueryStartInfo) func(info QuerySessionQueryDoneInfo) { 1390 fn := t.OnSessionQuery 1391 if fn == nil { 1392 return func(QuerySessionQueryDoneInfo) { 1393 return 1394 } 1395 } 1396 res := fn(q) 1397 if res == nil { 1398 return func(QuerySessionQueryDoneInfo) { 1399 return 1400 } 1401 } 1402 return res 1403 } 1404 func (t *Query) onSessionQueryResultSet(q QuerySessionQueryResultSetStartInfo) func(QuerySessionQueryResultSetDoneInfo) { 1405 fn := t.OnSessionQueryResultSet 1406 if fn == nil { 1407 return func(QuerySessionQueryResultSetDoneInfo) { 1408 return 1409 } 1410 } 1411 res := fn(q) 1412 if res == nil { 1413 return func(QuerySessionQueryResultSetDoneInfo) { 1414 return 1415 } 1416 } 1417 return res 1418 } 1419 func (t *Query) onSessionQueryRow(q QuerySessionQueryRowStartInfo) func(QuerySessionQueryRowDoneInfo) { 1420 fn := t.OnSessionQueryRow 1421 if fn == nil { 1422 return func(QuerySessionQueryRowDoneInfo) { 1423 return 1424 } 1425 } 1426 res := fn(q) 1427 if res == nil { 1428 return func(QuerySessionQueryRowDoneInfo) { 1429 return 1430 } 1431 } 1432 return res 1433 } 1434 func (t *Query) onSessionBegin(q QuerySessionBeginStartInfo) func(info QuerySessionBeginDoneInfo) { 1435 fn := t.OnSessionBegin 1436 if fn == nil { 1437 return func(QuerySessionBeginDoneInfo) { 1438 return 1439 } 1440 } 1441 res := fn(q) 1442 if res == nil { 1443 return func(QuerySessionBeginDoneInfo) { 1444 return 1445 } 1446 } 1447 return res 1448 } 1449 func (t *Query) onTxExec(q QueryTxExecStartInfo) func(info QueryTxExecDoneInfo) { 1450 fn := t.OnTxExec 1451 if fn == nil { 1452 return func(QueryTxExecDoneInfo) { 1453 return 1454 } 1455 } 1456 res := fn(q) 1457 if res == nil { 1458 return func(QueryTxExecDoneInfo) { 1459 return 1460 } 1461 } 1462 return res 1463 } 1464 func (t *Query) onTxQuery(q QueryTxQueryStartInfo) func(info QueryTxQueryDoneInfo) { 1465 fn := t.OnTxQuery 1466 if fn == nil { 1467 return func(QueryTxQueryDoneInfo) { 1468 return 1469 } 1470 } 1471 res := fn(q) 1472 if res == nil { 1473 return func(QueryTxQueryDoneInfo) { 1474 return 1475 } 1476 } 1477 return res 1478 } 1479 func (t *Query) onTxQueryResultSet(q QueryTxQueryResultSetStartInfo) func(QueryTxQueryResultSetDoneInfo) { 1480 fn := t.OnTxQueryResultSet 1481 if fn == nil { 1482 return func(QueryTxQueryResultSetDoneInfo) { 1483 return 1484 } 1485 } 1486 res := fn(q) 1487 if res == nil { 1488 return func(QueryTxQueryResultSetDoneInfo) { 1489 return 1490 } 1491 } 1492 return res 1493 } 1494 func (t *Query) onTxQueryRow(q QueryTxQueryRowStartInfo) func(QueryTxQueryRowDoneInfo) { 1495 fn := t.OnTxQueryRow 1496 if fn == nil { 1497 return func(QueryTxQueryRowDoneInfo) { 1498 return 1499 } 1500 } 1501 res := fn(q) 1502 if res == nil { 1503 return func(QueryTxQueryRowDoneInfo) { 1504 return 1505 } 1506 } 1507 return res 1508 } 1509 func (t *Query) onResultNew(q QueryResultNewStartInfo) func(info QueryResultNewDoneInfo) { 1510 fn := t.OnResultNew 1511 if fn == nil { 1512 return func(QueryResultNewDoneInfo) { 1513 return 1514 } 1515 } 1516 res := fn(q) 1517 if res == nil { 1518 return func(QueryResultNewDoneInfo) { 1519 return 1520 } 1521 } 1522 return res 1523 } 1524 func (t *Query) onResultNextPart(q QueryResultNextPartStartInfo) func(info QueryResultNextPartDoneInfo) { 1525 fn := t.OnResultNextPart 1526 if fn == nil { 1527 return func(QueryResultNextPartDoneInfo) { 1528 return 1529 } 1530 } 1531 res := fn(q) 1532 if res == nil { 1533 return func(QueryResultNextPartDoneInfo) { 1534 return 1535 } 1536 } 1537 return res 1538 } 1539 func (t *Query) onResultNextResultSet(q QueryResultNextResultSetStartInfo) func(info QueryResultNextResultSetDoneInfo) { 1540 fn := t.OnResultNextResultSet 1541 if fn == nil { 1542 return func(QueryResultNextResultSetDoneInfo) { 1543 return 1544 } 1545 } 1546 res := fn(q) 1547 if res == nil { 1548 return func(QueryResultNextResultSetDoneInfo) { 1549 return 1550 } 1551 } 1552 return res 1553 } 1554 func (t *Query) onResultClose(q QueryResultCloseStartInfo) func(info QueryResultCloseDoneInfo) { 1555 fn := t.OnResultClose 1556 if fn == nil { 1557 return func(QueryResultCloseDoneInfo) { 1558 return 1559 } 1560 } 1561 res := fn(q) 1562 if res == nil { 1563 return func(QueryResultCloseDoneInfo) { 1564 return 1565 } 1566 } 1567 return res 1568 } 1569 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1570 func QueryOnNew(t *Query, c *context.Context, call call) func() { 1571 var p QueryNewStartInfo 1572 p.Context = c 1573 p.Call = call 1574 res := t.onNew(p) 1575 return func() { 1576 var p QueryNewDoneInfo 1577 res(p) 1578 } 1579 } 1580 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1581 func QueryOnClose(t *Query, c *context.Context, call call) func(error) { 1582 var p QueryCloseStartInfo 1583 p.Context = c 1584 p.Call = call 1585 res := t.onClose(p) 1586 return func(e error) { 1587 var p QueryCloseDoneInfo 1588 p.Error = e 1589 res(p) 1590 } 1591 } 1592 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1593 func QueryOnPoolNew(t *Query, c *context.Context, call call) func(limit int) { 1594 var p QueryPoolNewStartInfo 1595 p.Context = c 1596 p.Call = call 1597 res := t.onPoolNew(p) 1598 return func(limit int) { 1599 var p QueryPoolNewDoneInfo 1600 p.Limit = limit 1601 res(p) 1602 } 1603 } 1604 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1605 func QueryOnPoolClose(t *Query, c *context.Context, call call) func(error) { 1606 var p QueryPoolCloseStartInfo 1607 p.Context = c 1608 p.Call = call 1609 res := t.onPoolClose(p) 1610 return func(e error) { 1611 var p QueryPoolCloseDoneInfo 1612 p.Error = e 1613 res(p) 1614 } 1615 } 1616 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1617 func QueryOnPoolTry(t *Query, c *context.Context, call call) func(error) { 1618 var p QueryPoolTryStartInfo 1619 p.Context = c 1620 p.Call = call 1621 res := t.onPoolTry(p) 1622 return func(e error) { 1623 var p QueryPoolTryDoneInfo 1624 p.Error = e 1625 res(p) 1626 } 1627 } 1628 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1629 func QueryOnPoolWith(t *Query, c *context.Context, call call) func(attempts int, _ error) { 1630 var p QueryPoolWithStartInfo 1631 p.Context = c 1632 p.Call = call 1633 res := t.onPoolWith(p) 1634 return func(attempts int, e error) { 1635 var p QueryPoolWithDoneInfo 1636 p.Attempts = attempts 1637 p.Error = e 1638 res(p) 1639 } 1640 } 1641 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1642 func QueryOnPoolPut(t *Query, c *context.Context, call call, session sessionInfo) func(error) { 1643 var p QueryPoolPutStartInfo 1644 p.Context = c 1645 p.Call = call 1646 p.Session = session 1647 res := t.onPoolPut(p) 1648 return func(e error) { 1649 var p QueryPoolPutDoneInfo 1650 p.Error = e 1651 res(p) 1652 } 1653 } 1654 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1655 func QueryOnPoolGet(t *Query, c *context.Context, call call) func(session sessionInfo, attempts int, _ error) { 1656 var p QueryPoolGetStartInfo 1657 p.Context = c 1658 p.Call = call 1659 res := t.onPoolGet(p) 1660 return func(session sessionInfo, attempts int, e error) { 1661 var p QueryPoolGetDoneInfo 1662 p.Session = session 1663 p.Attempts = attempts 1664 p.Error = e 1665 res(p) 1666 } 1667 } 1668 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1669 func QueryOnPoolChange(t *Query, limit int, index int, idle int, wait int, createInProgress int) { 1670 var p QueryPoolChange 1671 p.Limit = limit 1672 p.Index = index 1673 p.Idle = idle 1674 p.Wait = wait 1675 p.CreateInProgress = createInProgress 1676 t.onPoolChange(p) 1677 } 1678 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1679 func QueryOnDo(t *Query, c *context.Context, call call) func(attempts int, _ error) { 1680 var p QueryDoStartInfo 1681 p.Context = c 1682 p.Call = call 1683 res := t.onDo(p) 1684 return func(attempts int, e error) { 1685 var p QueryDoDoneInfo 1686 p.Attempts = attempts 1687 p.Error = e 1688 res(p) 1689 } 1690 } 1691 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1692 func QueryOnDoTx(t *Query, c *context.Context, call call) func(attempts int, _ error) { 1693 var p QueryDoTxStartInfo 1694 p.Context = c 1695 p.Call = call 1696 res := t.onDoTx(p) 1697 return func(attempts int, e error) { 1698 var p QueryDoTxDoneInfo 1699 p.Attempts = attempts 1700 p.Error = e 1701 res(p) 1702 } 1703 } 1704 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1705 func QueryOnExec(t *Query, c *context.Context, call call, query string) func(error) { 1706 var p QueryExecStartInfo 1707 p.Context = c 1708 p.Call = call 1709 p.Query = query 1710 res := t.onExec(p) 1711 return func(e error) { 1712 var p QueryExecDoneInfo 1713 p.Error = e 1714 res(p) 1715 } 1716 } 1717 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1718 func QueryOnQuery(t *Query, c *context.Context, call call, query string) func(error) { 1719 var p QueryQueryStartInfo 1720 p.Context = c 1721 p.Call = call 1722 p.Query = query 1723 res := t.onQuery(p) 1724 return func(e error) { 1725 var p QueryQueryDoneInfo 1726 p.Error = e 1727 res(p) 1728 } 1729 } 1730 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1731 func QueryOnQueryResultSet(t *Query, c *context.Context, call call, query string) func(error) { 1732 var p QueryQueryResultSetStartInfo 1733 p.Context = c 1734 p.Call = call 1735 p.Query = query 1736 res := t.onQueryResultSet(p) 1737 return func(e error) { 1738 var p QueryQueryResultSetDoneInfo 1739 p.Error = e 1740 res(p) 1741 } 1742 } 1743 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1744 func QueryOnQueryRow(t *Query, c *context.Context, call call, query string) func(error) { 1745 var p QueryQueryRowStartInfo 1746 p.Context = c 1747 p.Call = call 1748 p.Query = query 1749 res := t.onQueryRow(p) 1750 return func(e error) { 1751 var p QueryQueryRowDoneInfo 1752 p.Error = e 1753 res(p) 1754 } 1755 } 1756 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1757 func QueryOnSessionCreate(t *Query, c *context.Context, call call) func(session sessionInfo, _ error) { 1758 var p QuerySessionCreateStartInfo 1759 p.Context = c 1760 p.Call = call 1761 res := t.onSessionCreate(p) 1762 return func(session sessionInfo, e error) { 1763 var p QuerySessionCreateDoneInfo 1764 p.Session = session 1765 p.Error = e 1766 res(p) 1767 } 1768 } 1769 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1770 func QueryOnSessionAttach(t *Query, c *context.Context, call call, session sessionInfo) func(error) { 1771 var p QuerySessionAttachStartInfo 1772 p.Context = c 1773 p.Call = call 1774 p.Session = session 1775 res := t.onSessionAttach(p) 1776 return func(e error) { 1777 var p QuerySessionAttachDoneInfo 1778 p.Error = e 1779 res(p) 1780 } 1781 } 1782 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1783 func QueryOnSessionDelete(t *Query, c *context.Context, call call, session sessionInfo) func(error) { 1784 var p QuerySessionDeleteStartInfo 1785 p.Context = c 1786 p.Call = call 1787 p.Session = session 1788 res := t.onSessionDelete(p) 1789 return func(e error) { 1790 var p QuerySessionDeleteDoneInfo 1791 p.Error = e 1792 res(p) 1793 } 1794 } 1795 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1796 func QueryOnSessionExec(t *Query, c *context.Context, call call, session sessionInfo, query string) func(error) { 1797 var p QuerySessionExecStartInfo 1798 p.Context = c 1799 p.Call = call 1800 p.Session = session 1801 p.Query = query 1802 res := t.onSessionExec(p) 1803 return func(e error) { 1804 var p QuerySessionExecDoneInfo 1805 p.Error = e 1806 res(p) 1807 } 1808 } 1809 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1810 func QueryOnSessionQuery(t *Query, c *context.Context, call call, session sessionInfo, query string) func(error) { 1811 var p QuerySessionQueryStartInfo 1812 p.Context = c 1813 p.Call = call 1814 p.Session = session 1815 p.Query = query 1816 res := t.onSessionQuery(p) 1817 return func(e error) { 1818 var p QuerySessionQueryDoneInfo 1819 p.Error = e 1820 res(p) 1821 } 1822 } 1823 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1824 func QueryOnSessionQueryResultSet(t *Query, c *context.Context, call call, session sessionInfo, query string) func(error) { 1825 var p QuerySessionQueryResultSetStartInfo 1826 p.Context = c 1827 p.Call = call 1828 p.Session = session 1829 p.Query = query 1830 res := t.onSessionQueryResultSet(p) 1831 return func(e error) { 1832 var p QuerySessionQueryResultSetDoneInfo 1833 p.Error = e 1834 res(p) 1835 } 1836 } 1837 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1838 func QueryOnSessionQueryRow(t *Query, c *context.Context, call call, session sessionInfo, query string) func(error) { 1839 var p QuerySessionQueryRowStartInfo 1840 p.Context = c 1841 p.Call = call 1842 p.Session = session 1843 p.Query = query 1844 res := t.onSessionQueryRow(p) 1845 return func(e error) { 1846 var p QuerySessionQueryRowDoneInfo 1847 p.Error = e 1848 res(p) 1849 } 1850 } 1851 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1852 func QueryOnSessionBegin(t *Query, c *context.Context, call call, session sessionInfo) func(_ error, tx txInfo) { 1853 var p QuerySessionBeginStartInfo 1854 p.Context = c 1855 p.Call = call 1856 p.Session = session 1857 res := t.onSessionBegin(p) 1858 return func(e error, tx txInfo) { 1859 var p QuerySessionBeginDoneInfo 1860 p.Error = e 1861 p.Tx = tx 1862 res(p) 1863 } 1864 } 1865 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1866 func QueryOnTxExec(t *Query, c *context.Context, call call, session sessionInfo, tx txInfo, query string) func(error) { 1867 var p QueryTxExecStartInfo 1868 p.Context = c 1869 p.Call = call 1870 p.Session = session 1871 p.Tx = tx 1872 p.Query = query 1873 res := t.onTxExec(p) 1874 return func(e error) { 1875 var p QueryTxExecDoneInfo 1876 p.Error = e 1877 res(p) 1878 } 1879 } 1880 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1881 func QueryOnTxQuery(t *Query, c *context.Context, call call, session sessionInfo, tx txInfo, query string) func(error) { 1882 var p QueryTxQueryStartInfo 1883 p.Context = c 1884 p.Call = call 1885 p.Session = session 1886 p.Tx = tx 1887 p.Query = query 1888 res := t.onTxQuery(p) 1889 return func(e error) { 1890 var p QueryTxQueryDoneInfo 1891 p.Error = e 1892 res(p) 1893 } 1894 } 1895 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1896 func QueryOnTxQueryResultSet(t *Query, c *context.Context, call call, tx txInfo, query string) func(error) { 1897 var p QueryTxQueryResultSetStartInfo 1898 p.Context = c 1899 p.Call = call 1900 p.Tx = tx 1901 p.Query = query 1902 res := t.onTxQueryResultSet(p) 1903 return func(e error) { 1904 var p QueryTxQueryResultSetDoneInfo 1905 p.Error = e 1906 res(p) 1907 } 1908 } 1909 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1910 func QueryOnTxQueryRow(t *Query, c *context.Context, call call, tx txInfo, query string) func(error) { 1911 var p QueryTxQueryRowStartInfo 1912 p.Context = c 1913 p.Call = call 1914 p.Tx = tx 1915 p.Query = query 1916 res := t.onTxQueryRow(p) 1917 return func(e error) { 1918 var p QueryTxQueryRowDoneInfo 1919 p.Error = e 1920 res(p) 1921 } 1922 } 1923 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1924 func QueryOnResultNew(t *Query, c *context.Context, call call) func(error) { 1925 var p QueryResultNewStartInfo 1926 p.Context = c 1927 p.Call = call 1928 res := t.onResultNew(p) 1929 return func(e error) { 1930 var p QueryResultNewDoneInfo 1931 p.Error = e 1932 res(p) 1933 } 1934 } 1935 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1936 func QueryOnResultNextPart(t *Query, c *context.Context, call call) func(stats *Ydb_TableStats.QueryStats, _ error) { 1937 var p QueryResultNextPartStartInfo 1938 p.Context = c 1939 p.Call = call 1940 res := t.onResultNextPart(p) 1941 return func(stats *Ydb_TableStats.QueryStats, e error) { 1942 var p QueryResultNextPartDoneInfo 1943 p.Stats = stats 1944 p.Error = e 1945 res(p) 1946 } 1947 } 1948 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1949 func QueryOnResultNextResultSet(t *Query, c *context.Context, call call) func(error) { 1950 var p QueryResultNextResultSetStartInfo 1951 p.Context = c 1952 p.Call = call 1953 res := t.onResultNextResultSet(p) 1954 return func(e error) { 1955 var p QueryResultNextResultSetDoneInfo 1956 p.Error = e 1957 res(p) 1958 } 1959 } 1960 // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals 1961 func QueryOnResultClose(t *Query, c *context.Context, call call) func(error) { 1962 var p QueryResultCloseStartInfo 1963 p.Context = c 1964 p.Call = call 1965 res := t.onResultClose(p) 1966 return func(e error) { 1967 var p QueryResultCloseDoneInfo 1968 p.Error = e 1969 res(p) 1970 } 1971 }