github.com/vedadiyan/sqlparser@v1.0.0/pkg/sqlparser/cached_size.go (about) 1 /* 2 Copyright 2021 The Vitess Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 // Code generated by Sizegen. DO NOT EDIT. 17 18 package sqlparser 19 20 import ( 21 "math" 22 "reflect" 23 "unsafe" 24 25 hack "github.com/vedadiyan/sqlparser/pkg/hack" 26 ) 27 28 type cachedObject interface { 29 CachedSize(alloc bool) int64 30 } 31 32 func (cached *AddColumns) CachedSize(alloc bool) int64 { 33 if cached == nil { 34 return int64(0) 35 } 36 size := int64(0) 37 if alloc { 38 size += int64(48) 39 } 40 // field Columns []*vitess.io/vitess/go/vt/sqlparser.ColumnDefinition 41 { 42 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(8)) 43 for _, elem := range cached.Columns { 44 size += elem.CachedSize(true) 45 } 46 } 47 // field After *vitess.io/vitess/go/vt/sqlparser.ColName 48 size += cached.After.CachedSize(true) 49 return size 50 } 51 func (cached *AddConstraintDefinition) CachedSize(alloc bool) int64 { 52 if cached == nil { 53 return int64(0) 54 } 55 size := int64(0) 56 if alloc { 57 size += int64(8) 58 } 59 // field ConstraintDefinition *vitess.io/vitess/go/vt/sqlparser.ConstraintDefinition 60 size += cached.ConstraintDefinition.CachedSize(true) 61 return size 62 } 63 func (cached *AddIndexDefinition) CachedSize(alloc bool) int64 { 64 if cached == nil { 65 return int64(0) 66 } 67 size := int64(0) 68 if alloc { 69 size += int64(8) 70 } 71 // field IndexDefinition *vitess.io/vitess/go/vt/sqlparser.IndexDefinition 72 size += cached.IndexDefinition.CachedSize(true) 73 return size 74 } 75 func (cached *AliasedExpr) CachedSize(alloc bool) int64 { 76 if cached == nil { 77 return int64(0) 78 } 79 size := int64(0) 80 if alloc { 81 size += int64(48) 82 } 83 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 84 if cc, ok := cached.Expr.(cachedObject); ok { 85 size += cc.CachedSize(true) 86 } 87 // field As vitess.io/vitess/go/vt/sqlparser.IdentifierCI 88 size += cached.As.CachedSize(false) 89 return size 90 } 91 func (cached *AliasedTableExpr) CachedSize(alloc bool) int64 { 92 if cached == nil { 93 return int64(0) 94 } 95 size := int64(0) 96 if alloc { 97 size += int64(112) 98 } 99 // field Expr vitess.io/vitess/go/vt/sqlparser.SimpleTableExpr 100 if cc, ok := cached.Expr.(cachedObject); ok { 101 size += cc.CachedSize(true) 102 } 103 // field Partitions vitess.io/vitess/go/vt/sqlparser.Partitions 104 { 105 size += hack.RuntimeAllocSize(int64(cap(cached.Partitions)) * int64(32)) 106 for _, elem := range cached.Partitions { 107 size += elem.CachedSize(false) 108 } 109 } 110 // field As vitess.io/vitess/go/vt/sqlparser.IdentifierCS 111 size += cached.As.CachedSize(false) 112 // field Hints vitess.io/vitess/go/vt/sqlparser.IndexHints 113 { 114 size += hack.RuntimeAllocSize(int64(cap(cached.Hints)) * int64(8)) 115 for _, elem := range cached.Hints { 116 size += elem.CachedSize(true) 117 } 118 } 119 // field Columns vitess.io/vitess/go/vt/sqlparser.Columns 120 { 121 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(32)) 122 for _, elem := range cached.Columns { 123 size += elem.CachedSize(false) 124 } 125 } 126 return size 127 } 128 func (cached *AlterCharset) CachedSize(alloc bool) int64 { 129 if cached == nil { 130 return int64(0) 131 } 132 size := int64(0) 133 if alloc { 134 size += int64(32) 135 } 136 // field CharacterSet string 137 size += hack.RuntimeAllocSize(int64(len(cached.CharacterSet))) 138 // field Collate string 139 size += hack.RuntimeAllocSize(int64(len(cached.Collate))) 140 return size 141 } 142 func (cached *AlterCheck) CachedSize(alloc bool) int64 { 143 if cached == nil { 144 return int64(0) 145 } 146 size := int64(0) 147 if alloc { 148 size += int64(48) 149 } 150 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 151 size += cached.Name.CachedSize(false) 152 return size 153 } 154 func (cached *AlterColumn) CachedSize(alloc bool) int64 { 155 if cached == nil { 156 return int64(0) 157 } 158 size := int64(0) 159 if alloc { 160 size += int64(48) 161 } 162 // field Column *vitess.io/vitess/go/vt/sqlparser.ColName 163 size += cached.Column.CachedSize(true) 164 // field DefaultVal vitess.io/vitess/go/vt/sqlparser.Expr 165 if cc, ok := cached.DefaultVal.(cachedObject); ok { 166 size += cc.CachedSize(true) 167 } 168 // field Invisible *bool 169 size += hack.RuntimeAllocSize(int64(1)) 170 return size 171 } 172 func (cached *AlterDatabase) CachedSize(alloc bool) int64 { 173 if cached == nil { 174 return int64(0) 175 } 176 size := int64(0) 177 if alloc { 178 size += int64(64) 179 } 180 // field DBName vitess.io/vitess/go/vt/sqlparser.IdentifierCS 181 size += cached.DBName.CachedSize(false) 182 // field AlterOptions []vitess.io/vitess/go/vt/sqlparser.DatabaseOption 183 { 184 size += hack.RuntimeAllocSize(int64(cap(cached.AlterOptions)) * int64(24)) 185 for _, elem := range cached.AlterOptions { 186 size += elem.CachedSize(false) 187 } 188 } 189 return size 190 } 191 func (cached *AlterIndex) CachedSize(alloc bool) int64 { 192 if cached == nil { 193 return int64(0) 194 } 195 size := int64(0) 196 if alloc { 197 size += int64(48) 198 } 199 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 200 size += cached.Name.CachedSize(false) 201 return size 202 } 203 func (cached *AlterMigration) CachedSize(alloc bool) int64 { 204 if cached == nil { 205 return int64(0) 206 } 207 size := int64(0) 208 if alloc { 209 size += int64(64) 210 } 211 // field UUID string 212 size += hack.RuntimeAllocSize(int64(len(cached.UUID))) 213 // field Expire string 214 size += hack.RuntimeAllocSize(int64(len(cached.Expire))) 215 // field Ratio *vitess.io/vitess/go/vt/sqlparser.Literal 216 size += cached.Ratio.CachedSize(true) 217 // field Shards string 218 size += hack.RuntimeAllocSize(int64(len(cached.Shards))) 219 return size 220 } 221 func (cached *AlterTable) CachedSize(alloc bool) int64 { 222 if cached == nil { 223 return int64(0) 224 } 225 size := int64(0) 226 if alloc { 227 size += int64(96) 228 } 229 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 230 size += cached.Table.CachedSize(false) 231 // field AlterOptions []vitess.io/vitess/go/vt/sqlparser.AlterOption 232 { 233 size += hack.RuntimeAllocSize(int64(cap(cached.AlterOptions)) * int64(16)) 234 for _, elem := range cached.AlterOptions { 235 if cc, ok := elem.(cachedObject); ok { 236 size += cc.CachedSize(true) 237 } 238 } 239 } 240 // field PartitionSpec *vitess.io/vitess/go/vt/sqlparser.PartitionSpec 241 size += cached.PartitionSpec.CachedSize(true) 242 // field PartitionOption *vitess.io/vitess/go/vt/sqlparser.PartitionOption 243 size += cached.PartitionOption.CachedSize(true) 244 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 245 size += cached.Comments.CachedSize(true) 246 return size 247 } 248 func (cached *AlterView) CachedSize(alloc bool) int64 { 249 if cached == nil { 250 return int64(0) 251 } 252 size := int64(0) 253 if alloc { 254 size += int64(144) 255 } 256 // field ViewName vitess.io/vitess/go/vt/sqlparser.TableName 257 size += cached.ViewName.CachedSize(false) 258 // field Algorithm string 259 size += hack.RuntimeAllocSize(int64(len(cached.Algorithm))) 260 // field Definer *vitess.io/vitess/go/vt/sqlparser.Definer 261 size += cached.Definer.CachedSize(true) 262 // field Security string 263 size += hack.RuntimeAllocSize(int64(len(cached.Security))) 264 // field Columns vitess.io/vitess/go/vt/sqlparser.Columns 265 { 266 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(32)) 267 for _, elem := range cached.Columns { 268 size += elem.CachedSize(false) 269 } 270 } 271 // field Select vitess.io/vitess/go/vt/sqlparser.SelectStatement 272 if cc, ok := cached.Select.(cachedObject); ok { 273 size += cc.CachedSize(true) 274 } 275 // field CheckOption string 276 size += hack.RuntimeAllocSize(int64(len(cached.CheckOption))) 277 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 278 size += cached.Comments.CachedSize(true) 279 return size 280 } 281 func (cached *AlterVschema) CachedSize(alloc bool) int64 { 282 if cached == nil { 283 return int64(0) 284 } 285 size := int64(0) 286 if alloc { 287 size += int64(80) 288 } 289 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 290 size += cached.Table.CachedSize(false) 291 // field VindexSpec *vitess.io/vitess/go/vt/sqlparser.VindexSpec 292 size += cached.VindexSpec.CachedSize(true) 293 // field VindexCols []vitess.io/vitess/go/vt/sqlparser.IdentifierCI 294 { 295 size += hack.RuntimeAllocSize(int64(cap(cached.VindexCols)) * int64(32)) 296 for _, elem := range cached.VindexCols { 297 size += elem.CachedSize(false) 298 } 299 } 300 // field AutoIncSpec *vitess.io/vitess/go/vt/sqlparser.AutoIncSpec 301 size += cached.AutoIncSpec.CachedSize(true) 302 return size 303 } 304 func (cached *AndExpr) CachedSize(alloc bool) int64 { 305 if cached == nil { 306 return int64(0) 307 } 308 size := int64(0) 309 if alloc { 310 size += int64(32) 311 } 312 // field Left vitess.io/vitess/go/vt/sqlparser.Expr 313 if cc, ok := cached.Left.(cachedObject); ok { 314 size += cc.CachedSize(true) 315 } 316 // field Right vitess.io/vitess/go/vt/sqlparser.Expr 317 if cc, ok := cached.Right.(cachedObject); ok { 318 size += cc.CachedSize(true) 319 } 320 return size 321 } 322 func (cached *ArgumentLessWindowExpr) CachedSize(alloc bool) int64 { 323 if cached == nil { 324 return int64(0) 325 } 326 size := int64(0) 327 if alloc { 328 size += int64(16) 329 } 330 // field OverClause *vitess.io/vitess/go/vt/sqlparser.OverClause 331 size += cached.OverClause.CachedSize(true) 332 return size 333 } 334 func (cached *AutoIncSpec) CachedSize(alloc bool) int64 { 335 if cached == nil { 336 return int64(0) 337 } 338 size := int64(0) 339 if alloc { 340 size += int64(64) 341 } 342 // field Column vitess.io/vitess/go/vt/sqlparser.IdentifierCI 343 size += cached.Column.CachedSize(false) 344 // field Sequence vitess.io/vitess/go/vt/sqlparser.TableName 345 size += cached.Sequence.CachedSize(false) 346 return size 347 } 348 func (cached *Avg) CachedSize(alloc bool) int64 { 349 if cached == nil { 350 return int64(0) 351 } 352 size := int64(0) 353 if alloc { 354 size += int64(24) 355 } 356 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 357 if cc, ok := cached.Arg.(cachedObject); ok { 358 size += cc.CachedSize(true) 359 } 360 return size 361 } 362 func (cached *Begin) CachedSize(alloc bool) int64 { 363 if cached == nil { 364 return int64(0) 365 } 366 size := int64(0) 367 if alloc { 368 size += int64(24) 369 } 370 // field TxAccessModes []vitess.io/vitess/go/vt/sqlparser.TxAccessMode 371 { 372 size += hack.RuntimeAllocSize(int64(cap(cached.TxAccessModes))) 373 } 374 return size 375 } 376 func (cached *BetweenExpr) CachedSize(alloc bool) int64 { 377 if cached == nil { 378 return int64(0) 379 } 380 size := int64(0) 381 if alloc { 382 size += int64(64) 383 } 384 // field Left vitess.io/vitess/go/vt/sqlparser.Expr 385 if cc, ok := cached.Left.(cachedObject); ok { 386 size += cc.CachedSize(true) 387 } 388 // field From vitess.io/vitess/go/vt/sqlparser.Expr 389 if cc, ok := cached.From.(cachedObject); ok { 390 size += cc.CachedSize(true) 391 } 392 // field To vitess.io/vitess/go/vt/sqlparser.Expr 393 if cc, ok := cached.To.(cachedObject); ok { 394 size += cc.CachedSize(true) 395 } 396 return size 397 } 398 func (cached *BinaryExpr) CachedSize(alloc bool) int64 { 399 if cached == nil { 400 return int64(0) 401 } 402 size := int64(0) 403 if alloc { 404 size += int64(48) 405 } 406 // field Left vitess.io/vitess/go/vt/sqlparser.Expr 407 if cc, ok := cached.Left.(cachedObject); ok { 408 size += cc.CachedSize(true) 409 } 410 // field Right vitess.io/vitess/go/vt/sqlparser.Expr 411 if cc, ok := cached.Right.(cachedObject); ok { 412 size += cc.CachedSize(true) 413 } 414 return size 415 } 416 func (cached *BindVarNeeds) CachedSize(alloc bool) int64 { 417 if cached == nil { 418 return int64(0) 419 } 420 size := int64(0) 421 if alloc { 422 size += int64(80) 423 } 424 // field NeedFunctionResult []string 425 { 426 size += hack.RuntimeAllocSize(int64(cap(cached.NeedFunctionResult)) * int64(16)) 427 for _, elem := range cached.NeedFunctionResult { 428 size += hack.RuntimeAllocSize(int64(len(elem))) 429 } 430 } 431 // field NeedSystemVariable []string 432 { 433 size += hack.RuntimeAllocSize(int64(cap(cached.NeedSystemVariable)) * int64(16)) 434 for _, elem := range cached.NeedSystemVariable { 435 size += hack.RuntimeAllocSize(int64(len(elem))) 436 } 437 } 438 // field NeedUserDefinedVariables []string 439 { 440 size += hack.RuntimeAllocSize(int64(cap(cached.NeedUserDefinedVariables)) * int64(16)) 441 for _, elem := range cached.NeedUserDefinedVariables { 442 size += hack.RuntimeAllocSize(int64(len(elem))) 443 } 444 } 445 return size 446 } 447 func (cached *BitAnd) CachedSize(alloc bool) int64 { 448 if cached == nil { 449 return int64(0) 450 } 451 size := int64(0) 452 if alloc { 453 size += int64(16) 454 } 455 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 456 if cc, ok := cached.Arg.(cachedObject); ok { 457 size += cc.CachedSize(true) 458 } 459 return size 460 } 461 func (cached *BitOr) CachedSize(alloc bool) int64 { 462 if cached == nil { 463 return int64(0) 464 } 465 size := int64(0) 466 if alloc { 467 size += int64(16) 468 } 469 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 470 if cc, ok := cached.Arg.(cachedObject); ok { 471 size += cc.CachedSize(true) 472 } 473 return size 474 } 475 func (cached *BitXor) CachedSize(alloc bool) int64 { 476 if cached == nil { 477 return int64(0) 478 } 479 size := int64(0) 480 if alloc { 481 size += int64(16) 482 } 483 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 484 if cc, ok := cached.Arg.(cachedObject); ok { 485 size += cc.CachedSize(true) 486 } 487 return size 488 } 489 func (cached *CallProc) CachedSize(alloc bool) int64 { 490 if cached == nil { 491 return int64(0) 492 } 493 size := int64(0) 494 if alloc { 495 size += int64(64) 496 } 497 // field Name vitess.io/vitess/go/vt/sqlparser.TableName 498 size += cached.Name.CachedSize(false) 499 // field Params vitess.io/vitess/go/vt/sqlparser.Exprs 500 { 501 size += hack.RuntimeAllocSize(int64(cap(cached.Params)) * int64(16)) 502 for _, elem := range cached.Params { 503 if cc, ok := elem.(cachedObject); ok { 504 size += cc.CachedSize(true) 505 } 506 } 507 } 508 return size 509 } 510 func (cached *CaseExpr) CachedSize(alloc bool) int64 { 511 if cached == nil { 512 return int64(0) 513 } 514 size := int64(0) 515 if alloc { 516 size += int64(64) 517 } 518 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 519 if cc, ok := cached.Expr.(cachedObject); ok { 520 size += cc.CachedSize(true) 521 } 522 // field Whens []*vitess.io/vitess/go/vt/sqlparser.When 523 { 524 size += hack.RuntimeAllocSize(int64(cap(cached.Whens)) * int64(8)) 525 for _, elem := range cached.Whens { 526 size += elem.CachedSize(true) 527 } 528 } 529 // field Else vitess.io/vitess/go/vt/sqlparser.Expr 530 if cc, ok := cached.Else.(cachedObject); ok { 531 size += cc.CachedSize(true) 532 } 533 return size 534 } 535 func (cached *CastExpr) CachedSize(alloc bool) int64 { 536 if cached == nil { 537 return int64(0) 538 } 539 size := int64(0) 540 if alloc { 541 size += int64(32) 542 } 543 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 544 if cc, ok := cached.Expr.(cachedObject); ok { 545 size += cc.CachedSize(true) 546 } 547 // field Type *vitess.io/vitess/go/vt/sqlparser.ConvertType 548 size += cached.Type.CachedSize(true) 549 return size 550 } 551 func (cached *ChangeColumn) CachedSize(alloc bool) int64 { 552 if cached == nil { 553 return int64(0) 554 } 555 size := int64(0) 556 if alloc { 557 size += int64(32) 558 } 559 // field OldColumn *vitess.io/vitess/go/vt/sqlparser.ColName 560 size += cached.OldColumn.CachedSize(true) 561 // field NewColDefinition *vitess.io/vitess/go/vt/sqlparser.ColumnDefinition 562 size += cached.NewColDefinition.CachedSize(true) 563 // field After *vitess.io/vitess/go/vt/sqlparser.ColName 564 size += cached.After.CachedSize(true) 565 return size 566 } 567 func (cached *CharExpr) CachedSize(alloc bool) int64 { 568 if cached == nil { 569 return int64(0) 570 } 571 size := int64(0) 572 if alloc { 573 size += int64(48) 574 } 575 // field Exprs vitess.io/vitess/go/vt/sqlparser.Exprs 576 { 577 size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) 578 for _, elem := range cached.Exprs { 579 if cc, ok := elem.(cachedObject); ok { 580 size += cc.CachedSize(true) 581 } 582 } 583 } 584 // field Charset string 585 size += hack.RuntimeAllocSize(int64(len(cached.Charset))) 586 return size 587 } 588 func (cached *CheckConstraintDefinition) CachedSize(alloc bool) int64 { 589 if cached == nil { 590 return int64(0) 591 } 592 size := int64(0) 593 if alloc { 594 size += int64(24) 595 } 596 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 597 if cc, ok := cached.Expr.(cachedObject); ok { 598 size += cc.CachedSize(true) 599 } 600 return size 601 } 602 func (cached *ColName) CachedSize(alloc bool) int64 { 603 if cached == nil { 604 return int64(0) 605 } 606 size := int64(0) 607 if alloc { 608 size += int64(80) 609 } 610 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 611 size += cached.Name.CachedSize(false) 612 // field Qualifier vitess.io/vitess/go/vt/sqlparser.TableName 613 size += cached.Qualifier.CachedSize(false) 614 return size 615 } 616 func (cached *CollateExpr) CachedSize(alloc bool) int64 { 617 if cached == nil { 618 return int64(0) 619 } 620 size := int64(0) 621 if alloc { 622 size += int64(32) 623 } 624 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 625 if cc, ok := cached.Expr.(cachedObject); ok { 626 size += cc.CachedSize(true) 627 } 628 // field Collation string 629 size += hack.RuntimeAllocSize(int64(len(cached.Collation))) 630 return size 631 } 632 func (cached *ColumnCharset) CachedSize(alloc bool) int64 { 633 if cached == nil { 634 return int64(0) 635 } 636 size := int64(0) 637 if alloc { 638 size += int64(24) 639 } 640 // field Name string 641 size += hack.RuntimeAllocSize(int64(len(cached.Name))) 642 return size 643 } 644 func (cached *ColumnDefinition) CachedSize(alloc bool) int64 { 645 if cached == nil { 646 return int64(0) 647 } 648 size := int64(0) 649 if alloc { 650 size += int64(48) 651 } 652 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 653 size += cached.Name.CachedSize(false) 654 // field Type *vitess.io/vitess/go/vt/sqlparser.ColumnType 655 size += cached.Type.CachedSize(true) 656 return size 657 } 658 func (cached *ColumnType) CachedSize(alloc bool) int64 { 659 if cached == nil { 660 return int64(0) 661 } 662 size := int64(0) 663 if alloc { 664 size += int64(96) 665 } 666 // field Type string 667 size += hack.RuntimeAllocSize(int64(len(cached.Type))) 668 // field Options *vitess.io/vitess/go/vt/sqlparser.ColumnTypeOptions 669 size += cached.Options.CachedSize(true) 670 // field Length *vitess.io/vitess/go/vt/sqlparser.Literal 671 size += cached.Length.CachedSize(true) 672 // field Scale *vitess.io/vitess/go/vt/sqlparser.Literal 673 size += cached.Scale.CachedSize(true) 674 // field Charset vitess.io/vitess/go/vt/sqlparser.ColumnCharset 675 size += cached.Charset.CachedSize(false) 676 // field EnumValues []string 677 { 678 size += hack.RuntimeAllocSize(int64(cap(cached.EnumValues)) * int64(16)) 679 for _, elem := range cached.EnumValues { 680 size += hack.RuntimeAllocSize(int64(len(elem))) 681 } 682 } 683 return size 684 } 685 func (cached *ColumnTypeOptions) CachedSize(alloc bool) int64 { 686 if cached == nil { 687 return int64(0) 688 } 689 size := int64(0) 690 if alloc { 691 size += int64(160) 692 } 693 // field Null *bool 694 size += hack.RuntimeAllocSize(int64(1)) 695 // field Default vitess.io/vitess/go/vt/sqlparser.Expr 696 if cc, ok := cached.Default.(cachedObject); ok { 697 size += cc.CachedSize(true) 698 } 699 // field OnUpdate vitess.io/vitess/go/vt/sqlparser.Expr 700 if cc, ok := cached.OnUpdate.(cachedObject); ok { 701 size += cc.CachedSize(true) 702 } 703 // field As vitess.io/vitess/go/vt/sqlparser.Expr 704 if cc, ok := cached.As.(cachedObject); ok { 705 size += cc.CachedSize(true) 706 } 707 // field Comment *vitess.io/vitess/go/vt/sqlparser.Literal 708 size += cached.Comment.CachedSize(true) 709 // field Collate string 710 size += hack.RuntimeAllocSize(int64(len(cached.Collate))) 711 // field Reference *vitess.io/vitess/go/vt/sqlparser.ReferenceDefinition 712 size += cached.Reference.CachedSize(true) 713 // field Invisible *bool 714 size += hack.RuntimeAllocSize(int64(1)) 715 // field EngineAttribute *vitess.io/vitess/go/vt/sqlparser.Literal 716 size += cached.EngineAttribute.CachedSize(true) 717 // field SecondaryEngineAttribute *vitess.io/vitess/go/vt/sqlparser.Literal 718 size += cached.SecondaryEngineAttribute.CachedSize(true) 719 // field SRID *vitess.io/vitess/go/vt/sqlparser.Literal 720 size += cached.SRID.CachedSize(true) 721 return size 722 } 723 724 //go:nocheckptr 725 func (cached *CommentDirectives) CachedSize(alloc bool) int64 { 726 if cached == nil { 727 return int64(0) 728 } 729 size := int64(0) 730 if alloc { 731 size += int64(8) 732 } 733 // field m map[string]string 734 if cached.m != nil { 735 size += int64(48) 736 hmap := reflect.ValueOf(cached.m) 737 numBuckets := int(math.Pow(2, float64((*(*uint8)(unsafe.Pointer(hmap.Pointer() + uintptr(9))))))) 738 numOldBuckets := (*(*uint16)(unsafe.Pointer(hmap.Pointer() + uintptr(10)))) 739 size += hack.RuntimeAllocSize(int64(numOldBuckets * 272)) 740 if len(cached.m) > 0 || numBuckets > 1 { 741 size += hack.RuntimeAllocSize(int64(numBuckets * 272)) 742 } 743 for k, v := range cached.m { 744 size += hack.RuntimeAllocSize(int64(len(k))) 745 size += hack.RuntimeAllocSize(int64(len(v))) 746 } 747 } 748 return size 749 } 750 func (cached *CommentOnly) CachedSize(alloc bool) int64 { 751 if cached == nil { 752 return int64(0) 753 } 754 size := int64(0) 755 if alloc { 756 size += int64(24) 757 } 758 // field Comments []string 759 { 760 size += hack.RuntimeAllocSize(int64(cap(cached.Comments)) * int64(16)) 761 for _, elem := range cached.Comments { 762 size += hack.RuntimeAllocSize(int64(len(elem))) 763 } 764 } 765 return size 766 } 767 func (cached *CommonTableExpr) CachedSize(alloc bool) int64 { 768 if cached == nil { 769 return int64(0) 770 } 771 size := int64(0) 772 if alloc { 773 size += int64(48) 774 } 775 // field ID vitess.io/vitess/go/vt/sqlparser.IdentifierCS 776 size += cached.ID.CachedSize(false) 777 // field Columns vitess.io/vitess/go/vt/sqlparser.Columns 778 { 779 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(32)) 780 for _, elem := range cached.Columns { 781 size += elem.CachedSize(false) 782 } 783 } 784 // field Subquery *vitess.io/vitess/go/vt/sqlparser.Subquery 785 size += cached.Subquery.CachedSize(true) 786 return size 787 } 788 func (cached *ComparisonExpr) CachedSize(alloc bool) int64 { 789 if cached == nil { 790 return int64(0) 791 } 792 size := int64(0) 793 if alloc { 794 size += int64(64) 795 } 796 // field Left vitess.io/vitess/go/vt/sqlparser.Expr 797 if cc, ok := cached.Left.(cachedObject); ok { 798 size += cc.CachedSize(true) 799 } 800 // field Right vitess.io/vitess/go/vt/sqlparser.Expr 801 if cc, ok := cached.Right.(cachedObject); ok { 802 size += cc.CachedSize(true) 803 } 804 // field Escape vitess.io/vitess/go/vt/sqlparser.Expr 805 if cc, ok := cached.Escape.(cachedObject); ok { 806 size += cc.CachedSize(true) 807 } 808 return size 809 } 810 func (cached *ConstraintDefinition) CachedSize(alloc bool) int64 { 811 if cached == nil { 812 return int64(0) 813 } 814 size := int64(0) 815 if alloc { 816 size += int64(48) 817 } 818 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 819 size += cached.Name.CachedSize(false) 820 // field Details vitess.io/vitess/go/vt/sqlparser.ConstraintInfo 821 if cc, ok := cached.Details.(cachedObject); ok { 822 size += cc.CachedSize(true) 823 } 824 return size 825 } 826 func (cached *ConvertExpr) CachedSize(alloc bool) int64 { 827 if cached == nil { 828 return int64(0) 829 } 830 size := int64(0) 831 if alloc { 832 size += int64(24) 833 } 834 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 835 if cc, ok := cached.Expr.(cachedObject); ok { 836 size += cc.CachedSize(true) 837 } 838 // field Type *vitess.io/vitess/go/vt/sqlparser.ConvertType 839 size += cached.Type.CachedSize(true) 840 return size 841 } 842 func (cached *ConvertType) CachedSize(alloc bool) int64 { 843 if cached == nil { 844 return int64(0) 845 } 846 size := int64(0) 847 if alloc { 848 size += int64(64) 849 } 850 // field Type string 851 size += hack.RuntimeAllocSize(int64(len(cached.Type))) 852 // field Length *vitess.io/vitess/go/vt/sqlparser.Literal 853 size += cached.Length.CachedSize(true) 854 // field Scale *vitess.io/vitess/go/vt/sqlparser.Literal 855 size += cached.Scale.CachedSize(true) 856 // field Charset vitess.io/vitess/go/vt/sqlparser.ColumnCharset 857 size += cached.Charset.CachedSize(false) 858 return size 859 } 860 func (cached *ConvertUsingExpr) CachedSize(alloc bool) int64 { 861 if cached == nil { 862 return int64(0) 863 } 864 size := int64(0) 865 if alloc { 866 size += int64(32) 867 } 868 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 869 if cc, ok := cached.Expr.(cachedObject); ok { 870 size += cc.CachedSize(true) 871 } 872 // field Type string 873 size += hack.RuntimeAllocSize(int64(len(cached.Type))) 874 return size 875 } 876 func (cached *Count) CachedSize(alloc bool) int64 { 877 if cached == nil { 878 return int64(0) 879 } 880 size := int64(0) 881 if alloc { 882 size += int64(32) 883 } 884 // field Args vitess.io/vitess/go/vt/sqlparser.Exprs 885 { 886 size += hack.RuntimeAllocSize(int64(cap(cached.Args)) * int64(16)) 887 for _, elem := range cached.Args { 888 if cc, ok := elem.(cachedObject); ok { 889 size += cc.CachedSize(true) 890 } 891 } 892 } 893 return size 894 } 895 func (cached *CreateDatabase) CachedSize(alloc bool) int64 { 896 if cached == nil { 897 return int64(0) 898 } 899 size := int64(0) 900 if alloc { 901 size += int64(64) 902 } 903 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 904 size += cached.Comments.CachedSize(true) 905 // field DBName vitess.io/vitess/go/vt/sqlparser.IdentifierCS 906 size += cached.DBName.CachedSize(false) 907 // field CreateOptions []vitess.io/vitess/go/vt/sqlparser.DatabaseOption 908 { 909 size += hack.RuntimeAllocSize(int64(cap(cached.CreateOptions)) * int64(24)) 910 for _, elem := range cached.CreateOptions { 911 size += elem.CachedSize(false) 912 } 913 } 914 return size 915 } 916 func (cached *CreateTable) CachedSize(alloc bool) int64 { 917 if cached == nil { 918 return int64(0) 919 } 920 size := int64(0) 921 if alloc { 922 size += int64(80) 923 } 924 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 925 size += cached.Table.CachedSize(false) 926 // field TableSpec *vitess.io/vitess/go/vt/sqlparser.TableSpec 927 size += cached.TableSpec.CachedSize(true) 928 // field OptLike *vitess.io/vitess/go/vt/sqlparser.OptLike 929 size += cached.OptLike.CachedSize(true) 930 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 931 size += cached.Comments.CachedSize(true) 932 return size 933 } 934 func (cached *CreateView) CachedSize(alloc bool) int64 { 935 if cached == nil { 936 return int64(0) 937 } 938 size := int64(0) 939 if alloc { 940 size += int64(144) 941 } 942 // field ViewName vitess.io/vitess/go/vt/sqlparser.TableName 943 size += cached.ViewName.CachedSize(false) 944 // field Algorithm string 945 size += hack.RuntimeAllocSize(int64(len(cached.Algorithm))) 946 // field Definer *vitess.io/vitess/go/vt/sqlparser.Definer 947 size += cached.Definer.CachedSize(true) 948 // field Security string 949 size += hack.RuntimeAllocSize(int64(len(cached.Security))) 950 // field Columns vitess.io/vitess/go/vt/sqlparser.Columns 951 { 952 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(32)) 953 for _, elem := range cached.Columns { 954 size += elem.CachedSize(false) 955 } 956 } 957 // field Select vitess.io/vitess/go/vt/sqlparser.SelectStatement 958 if cc, ok := cached.Select.(cachedObject); ok { 959 size += cc.CachedSize(true) 960 } 961 // field CheckOption string 962 size += hack.RuntimeAllocSize(int64(len(cached.CheckOption))) 963 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 964 size += cached.Comments.CachedSize(true) 965 return size 966 } 967 func (cached *CurTimeFuncExpr) CachedSize(alloc bool) int64 { 968 if cached == nil { 969 return int64(0) 970 } 971 size := int64(0) 972 if alloc { 973 size += int64(48) 974 } 975 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 976 size += cached.Name.CachedSize(false) 977 // field Fsp vitess.io/vitess/go/vt/sqlparser.Expr 978 if cc, ok := cached.Fsp.(cachedObject); ok { 979 size += cc.CachedSize(true) 980 } 981 return size 982 } 983 func (cached *DatabaseOption) CachedSize(alloc bool) int64 { 984 if cached == nil { 985 return int64(0) 986 } 987 size := int64(0) 988 if alloc { 989 size += int64(24) 990 } 991 // field Value string 992 size += hack.RuntimeAllocSize(int64(len(cached.Value))) 993 return size 994 } 995 func (cached *DeallocateStmt) CachedSize(alloc bool) int64 { 996 if cached == nil { 997 return int64(0) 998 } 999 size := int64(0) 1000 if alloc { 1001 size += int64(48) 1002 } 1003 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 1004 size += cached.Comments.CachedSize(true) 1005 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1006 size += cached.Name.CachedSize(false) 1007 return size 1008 } 1009 func (cached *Default) CachedSize(alloc bool) int64 { 1010 if cached == nil { 1011 return int64(0) 1012 } 1013 size := int64(0) 1014 if alloc { 1015 size += int64(16) 1016 } 1017 // field ColName string 1018 size += hack.RuntimeAllocSize(int64(len(cached.ColName))) 1019 return size 1020 } 1021 func (cached *Definer) CachedSize(alloc bool) int64 { 1022 if cached == nil { 1023 return int64(0) 1024 } 1025 size := int64(0) 1026 if alloc { 1027 size += int64(32) 1028 } 1029 // field Name string 1030 size += hack.RuntimeAllocSize(int64(len(cached.Name))) 1031 // field Address string 1032 size += hack.RuntimeAllocSize(int64(len(cached.Address))) 1033 return size 1034 } 1035 func (cached *Delete) CachedSize(alloc bool) int64 { 1036 if cached == nil { 1037 return int64(0) 1038 } 1039 size := int64(0) 1040 if alloc { 1041 size += int64(144) 1042 } 1043 // field With *vitess.io/vitess/go/vt/sqlparser.With 1044 size += cached.With.CachedSize(true) 1045 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 1046 size += cached.Comments.CachedSize(true) 1047 // field Targets vitess.io/vitess/go/vt/sqlparser.TableNames 1048 { 1049 size += hack.RuntimeAllocSize(int64(cap(cached.Targets)) * int64(32)) 1050 for _, elem := range cached.Targets { 1051 size += elem.CachedSize(false) 1052 } 1053 } 1054 // field TableExprs vitess.io/vitess/go/vt/sqlparser.TableExprs 1055 { 1056 size += hack.RuntimeAllocSize(int64(cap(cached.TableExprs)) * int64(16)) 1057 for _, elem := range cached.TableExprs { 1058 if cc, ok := elem.(cachedObject); ok { 1059 size += cc.CachedSize(true) 1060 } 1061 } 1062 } 1063 // field Partitions vitess.io/vitess/go/vt/sqlparser.Partitions 1064 { 1065 size += hack.RuntimeAllocSize(int64(cap(cached.Partitions)) * int64(32)) 1066 for _, elem := range cached.Partitions { 1067 size += elem.CachedSize(false) 1068 } 1069 } 1070 // field Where *vitess.io/vitess/go/vt/sqlparser.Where 1071 size += cached.Where.CachedSize(true) 1072 // field OrderBy vitess.io/vitess/go/vt/sqlparser.OrderBy 1073 { 1074 size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(8)) 1075 for _, elem := range cached.OrderBy { 1076 size += elem.CachedSize(true) 1077 } 1078 } 1079 // field Limit *vitess.io/vitess/go/vt/sqlparser.Limit 1080 size += cached.Limit.CachedSize(true) 1081 return size 1082 } 1083 func (cached *DerivedTable) CachedSize(alloc bool) int64 { 1084 if cached == nil { 1085 return int64(0) 1086 } 1087 size := int64(0) 1088 if alloc { 1089 size += int64(24) 1090 } 1091 // field Select vitess.io/vitess/go/vt/sqlparser.SelectStatement 1092 if cc, ok := cached.Select.(cachedObject); ok { 1093 size += cc.CachedSize(true) 1094 } 1095 return size 1096 } 1097 func (cached *DropColumn) CachedSize(alloc bool) int64 { 1098 if cached == nil { 1099 return int64(0) 1100 } 1101 size := int64(0) 1102 if alloc { 1103 size += int64(8) 1104 } 1105 // field Name *vitess.io/vitess/go/vt/sqlparser.ColName 1106 size += cached.Name.CachedSize(true) 1107 return size 1108 } 1109 func (cached *DropDatabase) CachedSize(alloc bool) int64 { 1110 if cached == nil { 1111 return int64(0) 1112 } 1113 size := int64(0) 1114 if alloc { 1115 size += int64(32) 1116 } 1117 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 1118 size += cached.Comments.CachedSize(true) 1119 // field DBName vitess.io/vitess/go/vt/sqlparser.IdentifierCS 1120 size += cached.DBName.CachedSize(false) 1121 return size 1122 } 1123 func (cached *DropKey) CachedSize(alloc bool) int64 { 1124 if cached == nil { 1125 return int64(0) 1126 } 1127 size := int64(0) 1128 if alloc { 1129 size += int64(48) 1130 } 1131 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1132 size += cached.Name.CachedSize(false) 1133 return size 1134 } 1135 func (cached *DropTable) CachedSize(alloc bool) int64 { 1136 if cached == nil { 1137 return int64(0) 1138 } 1139 size := int64(0) 1140 if alloc { 1141 size += int64(48) 1142 } 1143 // field FromTables vitess.io/vitess/go/vt/sqlparser.TableNames 1144 { 1145 size += hack.RuntimeAllocSize(int64(cap(cached.FromTables)) * int64(32)) 1146 for _, elem := range cached.FromTables { 1147 size += elem.CachedSize(false) 1148 } 1149 } 1150 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 1151 size += cached.Comments.CachedSize(true) 1152 return size 1153 } 1154 func (cached *DropView) CachedSize(alloc bool) int64 { 1155 if cached == nil { 1156 return int64(0) 1157 } 1158 size := int64(0) 1159 if alloc { 1160 size += int64(48) 1161 } 1162 // field FromTables vitess.io/vitess/go/vt/sqlparser.TableNames 1163 { 1164 size += hack.RuntimeAllocSize(int64(cap(cached.FromTables)) * int64(32)) 1165 for _, elem := range cached.FromTables { 1166 size += elem.CachedSize(false) 1167 } 1168 } 1169 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 1170 size += cached.Comments.CachedSize(true) 1171 return size 1172 } 1173 func (cached *ExecuteStmt) CachedSize(alloc bool) int64 { 1174 if cached == nil { 1175 return int64(0) 1176 } 1177 size := int64(0) 1178 if alloc { 1179 size += int64(64) 1180 } 1181 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1182 size += cached.Name.CachedSize(false) 1183 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 1184 size += cached.Comments.CachedSize(true) 1185 // field Arguments []*vitess.io/vitess/go/vt/sqlparser.Variable 1186 { 1187 size += hack.RuntimeAllocSize(int64(cap(cached.Arguments)) * int64(8)) 1188 for _, elem := range cached.Arguments { 1189 size += elem.CachedSize(true) 1190 } 1191 } 1192 return size 1193 } 1194 func (cached *ExistsExpr) CachedSize(alloc bool) int64 { 1195 if cached == nil { 1196 return int64(0) 1197 } 1198 size := int64(0) 1199 if alloc { 1200 size += int64(8) 1201 } 1202 // field Subquery *vitess.io/vitess/go/vt/sqlparser.Subquery 1203 size += cached.Subquery.CachedSize(true) 1204 return size 1205 } 1206 func (cached *ExplainStmt) CachedSize(alloc bool) int64 { 1207 if cached == nil { 1208 return int64(0) 1209 } 1210 size := int64(0) 1211 if alloc { 1212 size += int64(32) 1213 } 1214 // field Statement vitess.io/vitess/go/vt/sqlparser.Statement 1215 if cc, ok := cached.Statement.(cachedObject); ok { 1216 size += cc.CachedSize(true) 1217 } 1218 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 1219 size += cached.Comments.CachedSize(true) 1220 return size 1221 } 1222 func (cached *ExplainTab) CachedSize(alloc bool) int64 { 1223 if cached == nil { 1224 return int64(0) 1225 } 1226 size := int64(0) 1227 if alloc { 1228 size += int64(48) 1229 } 1230 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 1231 size += cached.Table.CachedSize(false) 1232 // field Wild string 1233 size += hack.RuntimeAllocSize(int64(len(cached.Wild))) 1234 return size 1235 } 1236 func (cached *ExtractFuncExpr) CachedSize(alloc bool) int64 { 1237 if cached == nil { 1238 return int64(0) 1239 } 1240 size := int64(0) 1241 if alloc { 1242 size += int64(24) 1243 } 1244 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 1245 if cc, ok := cached.Expr.(cachedObject); ok { 1246 size += cc.CachedSize(true) 1247 } 1248 return size 1249 } 1250 func (cached *ExtractValueExpr) CachedSize(alloc bool) int64 { 1251 if cached == nil { 1252 return int64(0) 1253 } 1254 size := int64(0) 1255 if alloc { 1256 size += int64(32) 1257 } 1258 // field Fragment vitess.io/vitess/go/vt/sqlparser.Expr 1259 if cc, ok := cached.Fragment.(cachedObject); ok { 1260 size += cc.CachedSize(true) 1261 } 1262 // field XPathExpr vitess.io/vitess/go/vt/sqlparser.Expr 1263 if cc, ok := cached.XPathExpr.(cachedObject); ok { 1264 size += cc.CachedSize(true) 1265 } 1266 return size 1267 } 1268 func (cached *ExtractedSubquery) CachedSize(alloc bool) int64 { 1269 if cached == nil { 1270 return int64(0) 1271 } 1272 size := int64(0) 1273 if alloc { 1274 size += int64(112) 1275 } 1276 // field Original vitess.io/vitess/go/vt/sqlparser.Expr 1277 if cc, ok := cached.Original.(cachedObject); ok { 1278 size += cc.CachedSize(true) 1279 } 1280 // field Subquery *vitess.io/vitess/go/vt/sqlparser.Subquery 1281 size += cached.Subquery.CachedSize(true) 1282 // field OtherSide vitess.io/vitess/go/vt/sqlparser.Expr 1283 if cc, ok := cached.OtherSide.(cachedObject); ok { 1284 size += cc.CachedSize(true) 1285 } 1286 // field hasValuesArg string 1287 size += hack.RuntimeAllocSize(int64(len(cached.hasValuesArg))) 1288 // field argName string 1289 size += hack.RuntimeAllocSize(int64(len(cached.argName))) 1290 // field alternative vitess.io/vitess/go/vt/sqlparser.Expr 1291 if cc, ok := cached.alternative.(cachedObject); ok { 1292 size += cc.CachedSize(true) 1293 } 1294 return size 1295 } 1296 func (cached *FirstOrLastValueExpr) CachedSize(alloc bool) int64 { 1297 if cached == nil { 1298 return int64(0) 1299 } 1300 size := int64(0) 1301 if alloc { 1302 size += int64(48) 1303 } 1304 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 1305 if cc, ok := cached.Expr.(cachedObject); ok { 1306 size += cc.CachedSize(true) 1307 } 1308 // field NullTreatmentClause *vitess.io/vitess/go/vt/sqlparser.NullTreatmentClause 1309 if cached.NullTreatmentClause != nil { 1310 size += hack.RuntimeAllocSize(int64(1)) 1311 } 1312 // field OverClause *vitess.io/vitess/go/vt/sqlparser.OverClause 1313 size += cached.OverClause.CachedSize(true) 1314 return size 1315 } 1316 func (cached *Flush) CachedSize(alloc bool) int64 { 1317 if cached == nil { 1318 return int64(0) 1319 } 1320 size := int64(0) 1321 if alloc { 1322 size += int64(64) 1323 } 1324 // field FlushOptions []string 1325 { 1326 size += hack.RuntimeAllocSize(int64(cap(cached.FlushOptions)) * int64(16)) 1327 for _, elem := range cached.FlushOptions { 1328 size += hack.RuntimeAllocSize(int64(len(elem))) 1329 } 1330 } 1331 // field TableNames vitess.io/vitess/go/vt/sqlparser.TableNames 1332 { 1333 size += hack.RuntimeAllocSize(int64(cap(cached.TableNames)) * int64(32)) 1334 for _, elem := range cached.TableNames { 1335 size += elem.CachedSize(false) 1336 } 1337 } 1338 return size 1339 } 1340 func (cached *ForeignKeyDefinition) CachedSize(alloc bool) int64 { 1341 if cached == nil { 1342 return int64(0) 1343 } 1344 size := int64(0) 1345 if alloc { 1346 size += int64(64) 1347 } 1348 // field Source vitess.io/vitess/go/vt/sqlparser.Columns 1349 { 1350 size += hack.RuntimeAllocSize(int64(cap(cached.Source)) * int64(32)) 1351 for _, elem := range cached.Source { 1352 size += elem.CachedSize(false) 1353 } 1354 } 1355 // field IndexName vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1356 size += cached.IndexName.CachedSize(false) 1357 // field ReferenceDefinition *vitess.io/vitess/go/vt/sqlparser.ReferenceDefinition 1358 size += cached.ReferenceDefinition.CachedSize(true) 1359 return size 1360 } 1361 func (cached *FrameClause) CachedSize(alloc bool) int64 { 1362 if cached == nil { 1363 return int64(0) 1364 } 1365 size := int64(0) 1366 if alloc { 1367 size += int64(24) 1368 } 1369 // field Start *vitess.io/vitess/go/vt/sqlparser.FramePoint 1370 size += cached.Start.CachedSize(true) 1371 // field End *vitess.io/vitess/go/vt/sqlparser.FramePoint 1372 size += cached.End.CachedSize(true) 1373 return size 1374 } 1375 func (cached *FramePoint) CachedSize(alloc bool) int64 { 1376 if cached == nil { 1377 return int64(0) 1378 } 1379 size := int64(0) 1380 if alloc { 1381 size += int64(24) 1382 } 1383 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 1384 if cc, ok := cached.Expr.(cachedObject); ok { 1385 size += cc.CachedSize(true) 1386 } 1387 return size 1388 } 1389 func (cached *FuncExpr) CachedSize(alloc bool) int64 { 1390 if cached == nil { 1391 return int64(0) 1392 } 1393 size := int64(0) 1394 if alloc { 1395 size += int64(80) 1396 } 1397 // field Qualifier vitess.io/vitess/go/vt/sqlparser.IdentifierCS 1398 size += cached.Qualifier.CachedSize(false) 1399 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1400 size += cached.Name.CachedSize(false) 1401 // field Exprs vitess.io/vitess/go/vt/sqlparser.SelectExprs 1402 { 1403 size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) 1404 for _, elem := range cached.Exprs { 1405 if cc, ok := elem.(cachedObject); ok { 1406 size += cc.CachedSize(true) 1407 } 1408 } 1409 } 1410 return size 1411 } 1412 func (cached *GTIDFuncExpr) CachedSize(alloc bool) int64 { 1413 if cached == nil { 1414 return int64(0) 1415 } 1416 size := int64(0) 1417 if alloc { 1418 size += int64(80) 1419 } 1420 // field Set1 vitess.io/vitess/go/vt/sqlparser.Expr 1421 if cc, ok := cached.Set1.(cachedObject); ok { 1422 size += cc.CachedSize(true) 1423 } 1424 // field Set2 vitess.io/vitess/go/vt/sqlparser.Expr 1425 if cc, ok := cached.Set2.(cachedObject); ok { 1426 size += cc.CachedSize(true) 1427 } 1428 // field Timeout vitess.io/vitess/go/vt/sqlparser.Expr 1429 if cc, ok := cached.Timeout.(cachedObject); ok { 1430 size += cc.CachedSize(true) 1431 } 1432 // field Channel vitess.io/vitess/go/vt/sqlparser.Expr 1433 if cc, ok := cached.Channel.(cachedObject); ok { 1434 size += cc.CachedSize(true) 1435 } 1436 return size 1437 } 1438 func (cached *GroupConcatExpr) CachedSize(alloc bool) int64 { 1439 if cached == nil { 1440 return int64(0) 1441 } 1442 size := int64(0) 1443 if alloc { 1444 size += int64(80) 1445 } 1446 // field Exprs vitess.io/vitess/go/vt/sqlparser.Exprs 1447 { 1448 size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) 1449 for _, elem := range cached.Exprs { 1450 if cc, ok := elem.(cachedObject); ok { 1451 size += cc.CachedSize(true) 1452 } 1453 } 1454 } 1455 // field OrderBy vitess.io/vitess/go/vt/sqlparser.OrderBy 1456 { 1457 size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(8)) 1458 for _, elem := range cached.OrderBy { 1459 size += elem.CachedSize(true) 1460 } 1461 } 1462 // field Separator string 1463 size += hack.RuntimeAllocSize(int64(len(cached.Separator))) 1464 // field Limit *vitess.io/vitess/go/vt/sqlparser.Limit 1465 size += cached.Limit.CachedSize(true) 1466 return size 1467 } 1468 func (cached *IdentifierCI) CachedSize(alloc bool) int64 { 1469 if cached == nil { 1470 return int64(0) 1471 } 1472 size := int64(0) 1473 if alloc { 1474 size += int64(32) 1475 } 1476 // field val string 1477 size += hack.RuntimeAllocSize(int64(len(cached.val))) 1478 // field lowered string 1479 size += hack.RuntimeAllocSize(int64(len(cached.lowered))) 1480 return size 1481 } 1482 func (cached *IdentifierCS) CachedSize(alloc bool) int64 { 1483 if cached == nil { 1484 return int64(0) 1485 } 1486 size := int64(0) 1487 if alloc { 1488 size += int64(16) 1489 } 1490 // field v string 1491 size += hack.RuntimeAllocSize(int64(len(cached.v))) 1492 return size 1493 } 1494 func (cached *IndexColumn) CachedSize(alloc bool) int64 { 1495 if cached == nil { 1496 return int64(0) 1497 } 1498 size := int64(0) 1499 if alloc { 1500 size += int64(64) 1501 } 1502 // field Column vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1503 size += cached.Column.CachedSize(false) 1504 // field Length *vitess.io/vitess/go/vt/sqlparser.Literal 1505 size += cached.Length.CachedSize(true) 1506 // field Expression vitess.io/vitess/go/vt/sqlparser.Expr 1507 if cc, ok := cached.Expression.(cachedObject); ok { 1508 size += cc.CachedSize(true) 1509 } 1510 return size 1511 } 1512 func (cached *IndexDefinition) CachedSize(alloc bool) int64 { 1513 if cached == nil { 1514 return int64(0) 1515 } 1516 size := int64(0) 1517 if alloc { 1518 size += int64(64) 1519 } 1520 // field Info *vitess.io/vitess/go/vt/sqlparser.IndexInfo 1521 size += cached.Info.CachedSize(true) 1522 // field Columns []*vitess.io/vitess/go/vt/sqlparser.IndexColumn 1523 { 1524 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(8)) 1525 for _, elem := range cached.Columns { 1526 size += elem.CachedSize(true) 1527 } 1528 } 1529 // field Options []*vitess.io/vitess/go/vt/sqlparser.IndexOption 1530 { 1531 size += hack.RuntimeAllocSize(int64(cap(cached.Options)) * int64(8)) 1532 for _, elem := range cached.Options { 1533 size += elem.CachedSize(true) 1534 } 1535 } 1536 return size 1537 } 1538 func (cached *IndexHint) CachedSize(alloc bool) int64 { 1539 if cached == nil { 1540 return int64(0) 1541 } 1542 size := int64(0) 1543 if alloc { 1544 size += int64(32) 1545 } 1546 // field Indexes []vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1547 { 1548 size += hack.RuntimeAllocSize(int64(cap(cached.Indexes)) * int64(32)) 1549 for _, elem := range cached.Indexes { 1550 size += elem.CachedSize(false) 1551 } 1552 } 1553 return size 1554 } 1555 func (cached *IndexInfo) CachedSize(alloc bool) int64 { 1556 if cached == nil { 1557 return int64(0) 1558 } 1559 size := int64(0) 1560 if alloc { 1561 size += int64(96) 1562 } 1563 // field Type string 1564 size += hack.RuntimeAllocSize(int64(len(cached.Type))) 1565 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1566 size += cached.Name.CachedSize(false) 1567 // field ConstraintName vitess.io/vitess/go/vt/sqlparser.IdentifierCI 1568 size += cached.ConstraintName.CachedSize(false) 1569 return size 1570 } 1571 func (cached *IndexOption) CachedSize(alloc bool) int64 { 1572 if cached == nil { 1573 return int64(0) 1574 } 1575 size := int64(0) 1576 if alloc { 1577 size += int64(48) 1578 } 1579 // field Name string 1580 size += hack.RuntimeAllocSize(int64(len(cached.Name))) 1581 // field Value *vitess.io/vitess/go/vt/sqlparser.Literal 1582 size += cached.Value.CachedSize(true) 1583 // field String string 1584 size += hack.RuntimeAllocSize(int64(len(cached.String))) 1585 return size 1586 } 1587 func (cached *Insert) CachedSize(alloc bool) int64 { 1588 if cached == nil { 1589 return int64(0) 1590 } 1591 size := int64(0) 1592 if alloc { 1593 size += int64(144) 1594 } 1595 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 1596 size += cached.Comments.CachedSize(true) 1597 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 1598 size += cached.Table.CachedSize(false) 1599 // field Partitions vitess.io/vitess/go/vt/sqlparser.Partitions 1600 { 1601 size += hack.RuntimeAllocSize(int64(cap(cached.Partitions)) * int64(32)) 1602 for _, elem := range cached.Partitions { 1603 size += elem.CachedSize(false) 1604 } 1605 } 1606 // field Columns vitess.io/vitess/go/vt/sqlparser.Columns 1607 { 1608 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(32)) 1609 for _, elem := range cached.Columns { 1610 size += elem.CachedSize(false) 1611 } 1612 } 1613 // field Rows vitess.io/vitess/go/vt/sqlparser.InsertRows 1614 if cc, ok := cached.Rows.(cachedObject); ok { 1615 size += cc.CachedSize(true) 1616 } 1617 // field OnDup vitess.io/vitess/go/vt/sqlparser.OnDup 1618 { 1619 size += hack.RuntimeAllocSize(int64(cap(cached.OnDup)) * int64(8)) 1620 for _, elem := range cached.OnDup { 1621 size += elem.CachedSize(true) 1622 } 1623 } 1624 return size 1625 } 1626 func (cached *InsertExpr) CachedSize(alloc bool) int64 { 1627 if cached == nil { 1628 return int64(0) 1629 } 1630 size := int64(0) 1631 if alloc { 1632 size += int64(64) 1633 } 1634 // field Str vitess.io/vitess/go/vt/sqlparser.Expr 1635 if cc, ok := cached.Str.(cachedObject); ok { 1636 size += cc.CachedSize(true) 1637 } 1638 // field Pos vitess.io/vitess/go/vt/sqlparser.Expr 1639 if cc, ok := cached.Pos.(cachedObject); ok { 1640 size += cc.CachedSize(true) 1641 } 1642 // field Len vitess.io/vitess/go/vt/sqlparser.Expr 1643 if cc, ok := cached.Len.(cachedObject); ok { 1644 size += cc.CachedSize(true) 1645 } 1646 // field NewStr vitess.io/vitess/go/vt/sqlparser.Expr 1647 if cc, ok := cached.NewStr.(cachedObject); ok { 1648 size += cc.CachedSize(true) 1649 } 1650 return size 1651 } 1652 func (cached *IntervalExpr) CachedSize(alloc bool) int64 { 1653 if cached == nil { 1654 return int64(0) 1655 } 1656 size := int64(0) 1657 if alloc { 1658 size += int64(32) 1659 } 1660 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 1661 if cc, ok := cached.Expr.(cachedObject); ok { 1662 size += cc.CachedSize(true) 1663 } 1664 // field Unit string 1665 size += hack.RuntimeAllocSize(int64(len(cached.Unit))) 1666 return size 1667 } 1668 func (cached *IntervalFuncExpr) CachedSize(alloc bool) int64 { 1669 if cached == nil { 1670 return int64(0) 1671 } 1672 size := int64(0) 1673 if alloc { 1674 size += int64(48) 1675 } 1676 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 1677 if cc, ok := cached.Expr.(cachedObject); ok { 1678 size += cc.CachedSize(true) 1679 } 1680 // field Exprs vitess.io/vitess/go/vt/sqlparser.Exprs 1681 { 1682 size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) 1683 for _, elem := range cached.Exprs { 1684 if cc, ok := elem.(cachedObject); ok { 1685 size += cc.CachedSize(true) 1686 } 1687 } 1688 } 1689 return size 1690 } 1691 func (cached *IntroducerExpr) CachedSize(alloc bool) int64 { 1692 if cached == nil { 1693 return int64(0) 1694 } 1695 size := int64(0) 1696 if alloc { 1697 size += int64(32) 1698 } 1699 // field CharacterSet string 1700 size += hack.RuntimeAllocSize(int64(len(cached.CharacterSet))) 1701 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 1702 if cc, ok := cached.Expr.(cachedObject); ok { 1703 size += cc.CachedSize(true) 1704 } 1705 return size 1706 } 1707 func (cached *IsExpr) CachedSize(alloc bool) int64 { 1708 if cached == nil { 1709 return int64(0) 1710 } 1711 size := int64(0) 1712 if alloc { 1713 size += int64(24) 1714 } 1715 // field Left vitess.io/vitess/go/vt/sqlparser.Expr 1716 if cc, ok := cached.Left.(cachedObject); ok { 1717 size += cc.CachedSize(true) 1718 } 1719 return size 1720 } 1721 func (cached *JSONArrayExpr) CachedSize(alloc bool) int64 { 1722 if cached == nil { 1723 return int64(0) 1724 } 1725 size := int64(0) 1726 if alloc { 1727 size += int64(24) 1728 } 1729 // field Params vitess.io/vitess/go/vt/sqlparser.Exprs 1730 { 1731 size += hack.RuntimeAllocSize(int64(cap(cached.Params)) * int64(16)) 1732 for _, elem := range cached.Params { 1733 if cc, ok := elem.(cachedObject); ok { 1734 size += cc.CachedSize(true) 1735 } 1736 } 1737 } 1738 return size 1739 } 1740 func (cached *JSONAttributesExpr) CachedSize(alloc bool) int64 { 1741 if cached == nil { 1742 return int64(0) 1743 } 1744 size := int64(0) 1745 if alloc { 1746 size += int64(48) 1747 } 1748 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 1749 if cc, ok := cached.JSONDoc.(cachedObject); ok { 1750 size += cc.CachedSize(true) 1751 } 1752 // field Path vitess.io/vitess/go/vt/sqlparser.Expr 1753 if cc, ok := cached.Path.(cachedObject); ok { 1754 size += cc.CachedSize(true) 1755 } 1756 return size 1757 } 1758 func (cached *JSONContainsExpr) CachedSize(alloc bool) int64 { 1759 if cached == nil { 1760 return int64(0) 1761 } 1762 size := int64(0) 1763 if alloc { 1764 size += int64(64) 1765 } 1766 // field Target vitess.io/vitess/go/vt/sqlparser.Expr 1767 if cc, ok := cached.Target.(cachedObject); ok { 1768 size += cc.CachedSize(true) 1769 } 1770 // field Candidate vitess.io/vitess/go/vt/sqlparser.Expr 1771 if cc, ok := cached.Candidate.(cachedObject); ok { 1772 size += cc.CachedSize(true) 1773 } 1774 // field PathList []vitess.io/vitess/go/vt/sqlparser.Expr 1775 { 1776 size += hack.RuntimeAllocSize(int64(cap(cached.PathList)) * int64(16)) 1777 for _, elem := range cached.PathList { 1778 if cc, ok := elem.(cachedObject); ok { 1779 size += cc.CachedSize(true) 1780 } 1781 } 1782 } 1783 return size 1784 } 1785 func (cached *JSONContainsPathExpr) CachedSize(alloc bool) int64 { 1786 if cached == nil { 1787 return int64(0) 1788 } 1789 size := int64(0) 1790 if alloc { 1791 size += int64(64) 1792 } 1793 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 1794 if cc, ok := cached.JSONDoc.(cachedObject); ok { 1795 size += cc.CachedSize(true) 1796 } 1797 // field OneOrAll vitess.io/vitess/go/vt/sqlparser.Expr 1798 if cc, ok := cached.OneOrAll.(cachedObject); ok { 1799 size += cc.CachedSize(true) 1800 } 1801 // field PathList []vitess.io/vitess/go/vt/sqlparser.Expr 1802 { 1803 size += hack.RuntimeAllocSize(int64(cap(cached.PathList)) * int64(16)) 1804 for _, elem := range cached.PathList { 1805 if cc, ok := elem.(cachedObject); ok { 1806 size += cc.CachedSize(true) 1807 } 1808 } 1809 } 1810 return size 1811 } 1812 func (cached *JSONExtractExpr) CachedSize(alloc bool) int64 { 1813 if cached == nil { 1814 return int64(0) 1815 } 1816 size := int64(0) 1817 if alloc { 1818 size += int64(48) 1819 } 1820 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 1821 if cc, ok := cached.JSONDoc.(cachedObject); ok { 1822 size += cc.CachedSize(true) 1823 } 1824 // field PathList []vitess.io/vitess/go/vt/sqlparser.Expr 1825 { 1826 size += hack.RuntimeAllocSize(int64(cap(cached.PathList)) * int64(16)) 1827 for _, elem := range cached.PathList { 1828 if cc, ok := elem.(cachedObject); ok { 1829 size += cc.CachedSize(true) 1830 } 1831 } 1832 } 1833 return size 1834 } 1835 func (cached *JSONKeysExpr) CachedSize(alloc bool) int64 { 1836 if cached == nil { 1837 return int64(0) 1838 } 1839 size := int64(0) 1840 if alloc { 1841 size += int64(32) 1842 } 1843 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 1844 if cc, ok := cached.JSONDoc.(cachedObject); ok { 1845 size += cc.CachedSize(true) 1846 } 1847 // field Path vitess.io/vitess/go/vt/sqlparser.Expr 1848 if cc, ok := cached.Path.(cachedObject); ok { 1849 size += cc.CachedSize(true) 1850 } 1851 return size 1852 } 1853 func (cached *JSONObjectExpr) CachedSize(alloc bool) int64 { 1854 if cached == nil { 1855 return int64(0) 1856 } 1857 size := int64(0) 1858 if alloc { 1859 size += int64(24) 1860 } 1861 // field Params []*vitess.io/vitess/go/vt/sqlparser.JSONObjectParam 1862 { 1863 size += hack.RuntimeAllocSize(int64(cap(cached.Params)) * int64(8)) 1864 for _, elem := range cached.Params { 1865 size += elem.CachedSize(true) 1866 } 1867 } 1868 return size 1869 } 1870 func (cached *JSONObjectParam) CachedSize(alloc bool) int64 { 1871 if cached == nil { 1872 return int64(0) 1873 } 1874 size := int64(0) 1875 if alloc { 1876 size += int64(32) 1877 } 1878 // field Key vitess.io/vitess/go/vt/sqlparser.Expr 1879 if cc, ok := cached.Key.(cachedObject); ok { 1880 size += cc.CachedSize(true) 1881 } 1882 // field Value vitess.io/vitess/go/vt/sqlparser.Expr 1883 if cc, ok := cached.Value.(cachedObject); ok { 1884 size += cc.CachedSize(true) 1885 } 1886 return size 1887 } 1888 func (cached *JSONOverlapsExpr) CachedSize(alloc bool) int64 { 1889 if cached == nil { 1890 return int64(0) 1891 } 1892 size := int64(0) 1893 if alloc { 1894 size += int64(32) 1895 } 1896 // field JSONDoc1 vitess.io/vitess/go/vt/sqlparser.Expr 1897 if cc, ok := cached.JSONDoc1.(cachedObject); ok { 1898 size += cc.CachedSize(true) 1899 } 1900 // field JSONDoc2 vitess.io/vitess/go/vt/sqlparser.Expr 1901 if cc, ok := cached.JSONDoc2.(cachedObject); ok { 1902 size += cc.CachedSize(true) 1903 } 1904 return size 1905 } 1906 func (cached *JSONPrettyExpr) CachedSize(alloc bool) int64 { 1907 if cached == nil { 1908 return int64(0) 1909 } 1910 size := int64(0) 1911 if alloc { 1912 size += int64(16) 1913 } 1914 // field JSONVal vitess.io/vitess/go/vt/sqlparser.Expr 1915 if cc, ok := cached.JSONVal.(cachedObject); ok { 1916 size += cc.CachedSize(true) 1917 } 1918 return size 1919 } 1920 func (cached *JSONQuoteExpr) CachedSize(alloc bool) int64 { 1921 if cached == nil { 1922 return int64(0) 1923 } 1924 size := int64(0) 1925 if alloc { 1926 size += int64(16) 1927 } 1928 // field StringArg vitess.io/vitess/go/vt/sqlparser.Expr 1929 if cc, ok := cached.StringArg.(cachedObject); ok { 1930 size += cc.CachedSize(true) 1931 } 1932 return size 1933 } 1934 func (cached *JSONRemoveExpr) CachedSize(alloc bool) int64 { 1935 if cached == nil { 1936 return int64(0) 1937 } 1938 size := int64(0) 1939 if alloc { 1940 size += int64(48) 1941 } 1942 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 1943 if cc, ok := cached.JSONDoc.(cachedObject); ok { 1944 size += cc.CachedSize(true) 1945 } 1946 // field PathList vitess.io/vitess/go/vt/sqlparser.Exprs 1947 { 1948 size += hack.RuntimeAllocSize(int64(cap(cached.PathList)) * int64(16)) 1949 for _, elem := range cached.PathList { 1950 if cc, ok := elem.(cachedObject); ok { 1951 size += cc.CachedSize(true) 1952 } 1953 } 1954 } 1955 return size 1956 } 1957 func (cached *JSONSchemaValidFuncExpr) CachedSize(alloc bool) int64 { 1958 if cached == nil { 1959 return int64(0) 1960 } 1961 size := int64(0) 1962 if alloc { 1963 size += int64(32) 1964 } 1965 // field Schema vitess.io/vitess/go/vt/sqlparser.Expr 1966 if cc, ok := cached.Schema.(cachedObject); ok { 1967 size += cc.CachedSize(true) 1968 } 1969 // field Document vitess.io/vitess/go/vt/sqlparser.Expr 1970 if cc, ok := cached.Document.(cachedObject); ok { 1971 size += cc.CachedSize(true) 1972 } 1973 return size 1974 } 1975 func (cached *JSONSchemaValidationReportFuncExpr) CachedSize(alloc bool) int64 { 1976 if cached == nil { 1977 return int64(0) 1978 } 1979 size := int64(0) 1980 if alloc { 1981 size += int64(32) 1982 } 1983 // field Schema vitess.io/vitess/go/vt/sqlparser.Expr 1984 if cc, ok := cached.Schema.(cachedObject); ok { 1985 size += cc.CachedSize(true) 1986 } 1987 // field Document vitess.io/vitess/go/vt/sqlparser.Expr 1988 if cc, ok := cached.Document.(cachedObject); ok { 1989 size += cc.CachedSize(true) 1990 } 1991 return size 1992 } 1993 func (cached *JSONSearchExpr) CachedSize(alloc bool) int64 { 1994 if cached == nil { 1995 return int64(0) 1996 } 1997 size := int64(0) 1998 if alloc { 1999 size += int64(96) 2000 } 2001 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 2002 if cc, ok := cached.JSONDoc.(cachedObject); ok { 2003 size += cc.CachedSize(true) 2004 } 2005 // field OneOrAll vitess.io/vitess/go/vt/sqlparser.Expr 2006 if cc, ok := cached.OneOrAll.(cachedObject); ok { 2007 size += cc.CachedSize(true) 2008 } 2009 // field SearchStr vitess.io/vitess/go/vt/sqlparser.Expr 2010 if cc, ok := cached.SearchStr.(cachedObject); ok { 2011 size += cc.CachedSize(true) 2012 } 2013 // field EscapeChar vitess.io/vitess/go/vt/sqlparser.Expr 2014 if cc, ok := cached.EscapeChar.(cachedObject); ok { 2015 size += cc.CachedSize(true) 2016 } 2017 // field PathList []vitess.io/vitess/go/vt/sqlparser.Expr 2018 { 2019 size += hack.RuntimeAllocSize(int64(cap(cached.PathList)) * int64(16)) 2020 for _, elem := range cached.PathList { 2021 if cc, ok := elem.(cachedObject); ok { 2022 size += cc.CachedSize(true) 2023 } 2024 } 2025 } 2026 return size 2027 } 2028 func (cached *JSONStorageFreeExpr) CachedSize(alloc bool) int64 { 2029 if cached == nil { 2030 return int64(0) 2031 } 2032 size := int64(0) 2033 if alloc { 2034 size += int64(16) 2035 } 2036 // field JSONVal vitess.io/vitess/go/vt/sqlparser.Expr 2037 if cc, ok := cached.JSONVal.(cachedObject); ok { 2038 size += cc.CachedSize(true) 2039 } 2040 return size 2041 } 2042 func (cached *JSONStorageSizeExpr) CachedSize(alloc bool) int64 { 2043 if cached == nil { 2044 return int64(0) 2045 } 2046 size := int64(0) 2047 if alloc { 2048 size += int64(16) 2049 } 2050 // field JSONVal vitess.io/vitess/go/vt/sqlparser.Expr 2051 if cc, ok := cached.JSONVal.(cachedObject); ok { 2052 size += cc.CachedSize(true) 2053 } 2054 return size 2055 } 2056 func (cached *JSONTableExpr) CachedSize(alloc bool) int64 { 2057 if cached == nil { 2058 return int64(0) 2059 } 2060 size := int64(0) 2061 if alloc { 2062 size += int64(80) 2063 } 2064 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2065 if cc, ok := cached.Expr.(cachedObject); ok { 2066 size += cc.CachedSize(true) 2067 } 2068 // field Alias vitess.io/vitess/go/vt/sqlparser.IdentifierCS 2069 size += cached.Alias.CachedSize(false) 2070 // field Filter vitess.io/vitess/go/vt/sqlparser.Expr 2071 if cc, ok := cached.Filter.(cachedObject); ok { 2072 size += cc.CachedSize(true) 2073 } 2074 // field Columns []*vitess.io/vitess/go/vt/sqlparser.JtColumnDefinition 2075 { 2076 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(8)) 2077 for _, elem := range cached.Columns { 2078 size += elem.CachedSize(true) 2079 } 2080 } 2081 return size 2082 } 2083 func (cached *JSONUnquoteExpr) CachedSize(alloc bool) int64 { 2084 if cached == nil { 2085 return int64(0) 2086 } 2087 size := int64(0) 2088 if alloc { 2089 size += int64(16) 2090 } 2091 // field JSONValue vitess.io/vitess/go/vt/sqlparser.Expr 2092 if cc, ok := cached.JSONValue.(cachedObject); ok { 2093 size += cc.CachedSize(true) 2094 } 2095 return size 2096 } 2097 func (cached *JSONValueExpr) CachedSize(alloc bool) int64 { 2098 if cached == nil { 2099 return int64(0) 2100 } 2101 size := int64(0) 2102 if alloc { 2103 size += int64(64) 2104 } 2105 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 2106 if cc, ok := cached.JSONDoc.(cachedObject); ok { 2107 size += cc.CachedSize(true) 2108 } 2109 // field Path vitess.io/vitess/go/vt/sqlparser.Expr 2110 if cc, ok := cached.Path.(cachedObject); ok { 2111 size += cc.CachedSize(true) 2112 } 2113 // field ReturningType *vitess.io/vitess/go/vt/sqlparser.ConvertType 2114 size += cached.ReturningType.CachedSize(true) 2115 // field EmptyOnResponse *vitess.io/vitess/go/vt/sqlparser.JtOnResponse 2116 size += cached.EmptyOnResponse.CachedSize(true) 2117 // field ErrorOnResponse *vitess.io/vitess/go/vt/sqlparser.JtOnResponse 2118 size += cached.ErrorOnResponse.CachedSize(true) 2119 return size 2120 } 2121 func (cached *JSONValueMergeExpr) CachedSize(alloc bool) int64 { 2122 if cached == nil { 2123 return int64(0) 2124 } 2125 size := int64(0) 2126 if alloc { 2127 size += int64(48) 2128 } 2129 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 2130 if cc, ok := cached.JSONDoc.(cachedObject); ok { 2131 size += cc.CachedSize(true) 2132 } 2133 // field JSONDocList vitess.io/vitess/go/vt/sqlparser.Exprs 2134 { 2135 size += hack.RuntimeAllocSize(int64(cap(cached.JSONDocList)) * int64(16)) 2136 for _, elem := range cached.JSONDocList { 2137 if cc, ok := elem.(cachedObject); ok { 2138 size += cc.CachedSize(true) 2139 } 2140 } 2141 } 2142 return size 2143 } 2144 func (cached *JSONValueModifierExpr) CachedSize(alloc bool) int64 { 2145 if cached == nil { 2146 return int64(0) 2147 } 2148 size := int64(0) 2149 if alloc { 2150 size += int64(48) 2151 } 2152 // field JSONDoc vitess.io/vitess/go/vt/sqlparser.Expr 2153 if cc, ok := cached.JSONDoc.(cachedObject); ok { 2154 size += cc.CachedSize(true) 2155 } 2156 // field Params []*vitess.io/vitess/go/vt/sqlparser.JSONObjectParam 2157 { 2158 size += hack.RuntimeAllocSize(int64(cap(cached.Params)) * int64(8)) 2159 for _, elem := range cached.Params { 2160 size += elem.CachedSize(true) 2161 } 2162 } 2163 return size 2164 } 2165 func (cached *JoinCondition) CachedSize(alloc bool) int64 { 2166 if cached == nil { 2167 return int64(0) 2168 } 2169 size := int64(0) 2170 if alloc { 2171 size += int64(48) 2172 } 2173 // field On vitess.io/vitess/go/vt/sqlparser.Expr 2174 if cc, ok := cached.On.(cachedObject); ok { 2175 size += cc.CachedSize(true) 2176 } 2177 // field Using vitess.io/vitess/go/vt/sqlparser.Columns 2178 { 2179 size += hack.RuntimeAllocSize(int64(cap(cached.Using)) * int64(32)) 2180 for _, elem := range cached.Using { 2181 size += elem.CachedSize(false) 2182 } 2183 } 2184 return size 2185 } 2186 func (cached *JoinTableExpr) CachedSize(alloc bool) int64 { 2187 if cached == nil { 2188 return int64(0) 2189 } 2190 size := int64(0) 2191 if alloc { 2192 size += int64(48) 2193 } 2194 // field LeftExpr vitess.io/vitess/go/vt/sqlparser.TableExpr 2195 if cc, ok := cached.LeftExpr.(cachedObject); ok { 2196 size += cc.CachedSize(true) 2197 } 2198 // field RightExpr vitess.io/vitess/go/vt/sqlparser.TableExpr 2199 if cc, ok := cached.RightExpr.(cachedObject); ok { 2200 size += cc.CachedSize(true) 2201 } 2202 // field Condition *vitess.io/vitess/go/vt/sqlparser.JoinCondition 2203 size += cached.Condition.CachedSize(true) 2204 return size 2205 } 2206 func (cached *JtColumnDefinition) CachedSize(alloc bool) int64 { 2207 if cached == nil { 2208 return int64(0) 2209 } 2210 size := int64(0) 2211 if alloc { 2212 size += int64(24) 2213 } 2214 // field JtOrdinal *vitess.io/vitess/go/vt/sqlparser.JtOrdinalColDef 2215 size += cached.JtOrdinal.CachedSize(true) 2216 // field JtPath *vitess.io/vitess/go/vt/sqlparser.JtPathColDef 2217 size += cached.JtPath.CachedSize(true) 2218 // field JtNestedPath *vitess.io/vitess/go/vt/sqlparser.JtNestedPathColDef 2219 size += cached.JtNestedPath.CachedSize(true) 2220 return size 2221 } 2222 func (cached *JtNestedPathColDef) CachedSize(alloc bool) int64 { 2223 if cached == nil { 2224 return int64(0) 2225 } 2226 size := int64(0) 2227 if alloc { 2228 size += int64(48) 2229 } 2230 // field Path vitess.io/vitess/go/vt/sqlparser.Expr 2231 if cc, ok := cached.Path.(cachedObject); ok { 2232 size += cc.CachedSize(true) 2233 } 2234 // field Columns []*vitess.io/vitess/go/vt/sqlparser.JtColumnDefinition 2235 { 2236 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(8)) 2237 for _, elem := range cached.Columns { 2238 size += elem.CachedSize(true) 2239 } 2240 } 2241 return size 2242 } 2243 func (cached *JtOnResponse) CachedSize(alloc bool) int64 { 2244 if cached == nil { 2245 return int64(0) 2246 } 2247 size := int64(0) 2248 if alloc { 2249 size += int64(24) 2250 } 2251 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2252 if cc, ok := cached.Expr.(cachedObject); ok { 2253 size += cc.CachedSize(true) 2254 } 2255 return size 2256 } 2257 func (cached *JtOrdinalColDef) CachedSize(alloc bool) int64 { 2258 if cached == nil { 2259 return int64(0) 2260 } 2261 size := int64(0) 2262 if alloc { 2263 size += int64(32) 2264 } 2265 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 2266 size += cached.Name.CachedSize(false) 2267 return size 2268 } 2269 func (cached *JtPathColDef) CachedSize(alloc bool) int64 { 2270 if cached == nil { 2271 return int64(0) 2272 } 2273 size := int64(0) 2274 if alloc { 2275 size += int64(80) 2276 } 2277 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 2278 size += cached.Name.CachedSize(false) 2279 // field Type *vitess.io/vitess/go/vt/sqlparser.ColumnType 2280 size += cached.Type.CachedSize(true) 2281 // field Path vitess.io/vitess/go/vt/sqlparser.Expr 2282 if cc, ok := cached.Path.(cachedObject); ok { 2283 size += cc.CachedSize(true) 2284 } 2285 // field EmptyOnResponse *vitess.io/vitess/go/vt/sqlparser.JtOnResponse 2286 size += cached.EmptyOnResponse.CachedSize(true) 2287 // field ErrorOnResponse *vitess.io/vitess/go/vt/sqlparser.JtOnResponse 2288 size += cached.ErrorOnResponse.CachedSize(true) 2289 return size 2290 } 2291 func (cached *KeyState) CachedSize(alloc bool) int64 { 2292 if cached == nil { 2293 return int64(0) 2294 } 2295 size := int64(0) 2296 if alloc { 2297 size += int64(8) 2298 } 2299 return size 2300 } 2301 func (cached *LagLeadExpr) CachedSize(alloc bool) int64 { 2302 if cached == nil { 2303 return int64(0) 2304 } 2305 size := int64(0) 2306 if alloc { 2307 size += int64(80) 2308 } 2309 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2310 if cc, ok := cached.Expr.(cachedObject); ok { 2311 size += cc.CachedSize(true) 2312 } 2313 // field N vitess.io/vitess/go/vt/sqlparser.Expr 2314 if cc, ok := cached.N.(cachedObject); ok { 2315 size += cc.CachedSize(true) 2316 } 2317 // field Default vitess.io/vitess/go/vt/sqlparser.Expr 2318 if cc, ok := cached.Default.(cachedObject); ok { 2319 size += cc.CachedSize(true) 2320 } 2321 // field OverClause *vitess.io/vitess/go/vt/sqlparser.OverClause 2322 size += cached.OverClause.CachedSize(true) 2323 // field NullTreatmentClause *vitess.io/vitess/go/vt/sqlparser.NullTreatmentClause 2324 if cached.NullTreatmentClause != nil { 2325 size += hack.RuntimeAllocSize(int64(1)) 2326 } 2327 return size 2328 } 2329 func (cached *Limit) CachedSize(alloc bool) int64 { 2330 if cached == nil { 2331 return int64(0) 2332 } 2333 size := int64(0) 2334 if alloc { 2335 size += int64(32) 2336 } 2337 // field Offset vitess.io/vitess/go/vt/sqlparser.Expr 2338 if cc, ok := cached.Offset.(cachedObject); ok { 2339 size += cc.CachedSize(true) 2340 } 2341 // field Rowcount vitess.io/vitess/go/vt/sqlparser.Expr 2342 if cc, ok := cached.Rowcount.(cachedObject); ok { 2343 size += cc.CachedSize(true) 2344 } 2345 return size 2346 } 2347 func (cached *LineStringExpr) CachedSize(alloc bool) int64 { 2348 if cached == nil { 2349 return int64(0) 2350 } 2351 size := int64(0) 2352 if alloc { 2353 size += int64(24) 2354 } 2355 // field PointParams vitess.io/vitess/go/vt/sqlparser.Exprs 2356 { 2357 size += hack.RuntimeAllocSize(int64(cap(cached.PointParams)) * int64(16)) 2358 for _, elem := range cached.PointParams { 2359 if cc, ok := elem.(cachedObject); ok { 2360 size += cc.CachedSize(true) 2361 } 2362 } 2363 } 2364 return size 2365 } 2366 func (cached *Literal) CachedSize(alloc bool) int64 { 2367 if cached == nil { 2368 return int64(0) 2369 } 2370 size := int64(0) 2371 if alloc { 2372 size += int64(24) 2373 } 2374 // field Val string 2375 size += hack.RuntimeAllocSize(int64(len(cached.Val))) 2376 return size 2377 } 2378 func (cached *LocateExpr) CachedSize(alloc bool) int64 { 2379 if cached == nil { 2380 return int64(0) 2381 } 2382 size := int64(0) 2383 if alloc { 2384 size += int64(48) 2385 } 2386 // field SubStr vitess.io/vitess/go/vt/sqlparser.Expr 2387 if cc, ok := cached.SubStr.(cachedObject); ok { 2388 size += cc.CachedSize(true) 2389 } 2390 // field Str vitess.io/vitess/go/vt/sqlparser.Expr 2391 if cc, ok := cached.Str.(cachedObject); ok { 2392 size += cc.CachedSize(true) 2393 } 2394 // field Pos vitess.io/vitess/go/vt/sqlparser.Expr 2395 if cc, ok := cached.Pos.(cachedObject); ok { 2396 size += cc.CachedSize(true) 2397 } 2398 return size 2399 } 2400 func (cached *LockOption) CachedSize(alloc bool) int64 { 2401 if cached == nil { 2402 return int64(0) 2403 } 2404 size := int64(0) 2405 if alloc { 2406 size += int64(8) 2407 } 2408 return size 2409 } 2410 func (cached *LockTables) CachedSize(alloc bool) int64 { 2411 if cached == nil { 2412 return int64(0) 2413 } 2414 size := int64(0) 2415 if alloc { 2416 size += int64(24) 2417 } 2418 // field Tables vitess.io/vitess/go/vt/sqlparser.TableAndLockTypes 2419 { 2420 size += hack.RuntimeAllocSize(int64(cap(cached.Tables)) * int64(8)) 2421 for _, elem := range cached.Tables { 2422 size += elem.CachedSize(true) 2423 } 2424 } 2425 return size 2426 } 2427 func (cached *LockingFunc) CachedSize(alloc bool) int64 { 2428 if cached == nil { 2429 return int64(0) 2430 } 2431 size := int64(0) 2432 if alloc { 2433 size += int64(48) 2434 } 2435 // field Name vitess.io/vitess/go/vt/sqlparser.Expr 2436 if cc, ok := cached.Name.(cachedObject); ok { 2437 size += cc.CachedSize(true) 2438 } 2439 // field Timeout vitess.io/vitess/go/vt/sqlparser.Expr 2440 if cc, ok := cached.Timeout.(cachedObject); ok { 2441 size += cc.CachedSize(true) 2442 } 2443 return size 2444 } 2445 func (cached *MatchExpr) CachedSize(alloc bool) int64 { 2446 if cached == nil { 2447 return int64(0) 2448 } 2449 size := int64(0) 2450 if alloc { 2451 size += int64(48) 2452 } 2453 // field Columns []*vitess.io/vitess/go/vt/sqlparser.ColName 2454 { 2455 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(8)) 2456 for _, elem := range cached.Columns { 2457 size += elem.CachedSize(true) 2458 } 2459 } 2460 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2461 if cc, ok := cached.Expr.(cachedObject); ok { 2462 size += cc.CachedSize(true) 2463 } 2464 return size 2465 } 2466 func (cached *Max) CachedSize(alloc bool) int64 { 2467 if cached == nil { 2468 return int64(0) 2469 } 2470 size := int64(0) 2471 if alloc { 2472 size += int64(24) 2473 } 2474 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 2475 if cc, ok := cached.Arg.(cachedObject); ok { 2476 size += cc.CachedSize(true) 2477 } 2478 return size 2479 } 2480 func (cached *MemberOfExpr) CachedSize(alloc bool) int64 { 2481 if cached == nil { 2482 return int64(0) 2483 } 2484 size := int64(0) 2485 if alloc { 2486 size += int64(32) 2487 } 2488 // field Value vitess.io/vitess/go/vt/sqlparser.Expr 2489 if cc, ok := cached.Value.(cachedObject); ok { 2490 size += cc.CachedSize(true) 2491 } 2492 // field JSONArr vitess.io/vitess/go/vt/sqlparser.Expr 2493 if cc, ok := cached.JSONArr.(cachedObject); ok { 2494 size += cc.CachedSize(true) 2495 } 2496 return size 2497 } 2498 func (cached *Min) CachedSize(alloc bool) int64 { 2499 if cached == nil { 2500 return int64(0) 2501 } 2502 size := int64(0) 2503 if alloc { 2504 size += int64(24) 2505 } 2506 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 2507 if cc, ok := cached.Arg.(cachedObject); ok { 2508 size += cc.CachedSize(true) 2509 } 2510 return size 2511 } 2512 func (cached *ModifyColumn) CachedSize(alloc bool) int64 { 2513 if cached == nil { 2514 return int64(0) 2515 } 2516 size := int64(0) 2517 if alloc { 2518 size += int64(24) 2519 } 2520 // field NewColDefinition *vitess.io/vitess/go/vt/sqlparser.ColumnDefinition 2521 size += cached.NewColDefinition.CachedSize(true) 2522 // field After *vitess.io/vitess/go/vt/sqlparser.ColName 2523 size += cached.After.CachedSize(true) 2524 return size 2525 } 2526 func (cached *NTHValueExpr) CachedSize(alloc bool) int64 { 2527 if cached == nil { 2528 return int64(0) 2529 } 2530 size := int64(0) 2531 if alloc { 2532 size += int64(64) 2533 } 2534 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2535 if cc, ok := cached.Expr.(cachedObject); ok { 2536 size += cc.CachedSize(true) 2537 } 2538 // field N vitess.io/vitess/go/vt/sqlparser.Expr 2539 if cc, ok := cached.N.(cachedObject); ok { 2540 size += cc.CachedSize(true) 2541 } 2542 // field OverClause *vitess.io/vitess/go/vt/sqlparser.OverClause 2543 size += cached.OverClause.CachedSize(true) 2544 // field FromFirstLastClause *vitess.io/vitess/go/vt/sqlparser.FromFirstLastClause 2545 if cached.FromFirstLastClause != nil { 2546 size += hack.RuntimeAllocSize(int64(1)) 2547 } 2548 // field NullTreatmentClause *vitess.io/vitess/go/vt/sqlparser.NullTreatmentClause 2549 if cached.NullTreatmentClause != nil { 2550 size += hack.RuntimeAllocSize(int64(1)) 2551 } 2552 return size 2553 } 2554 func (cached *NamedWindow) CachedSize(alloc bool) int64 { 2555 if cached == nil { 2556 return int64(0) 2557 } 2558 size := int64(0) 2559 if alloc { 2560 size += int64(24) 2561 } 2562 // field Windows vitess.io/vitess/go/vt/sqlparser.WindowDefinitions 2563 { 2564 size += hack.RuntimeAllocSize(int64(cap(cached.Windows)) * int64(8)) 2565 for _, elem := range cached.Windows { 2566 size += elem.CachedSize(true) 2567 } 2568 } 2569 return size 2570 } 2571 func (cached *Nextval) CachedSize(alloc bool) int64 { 2572 if cached == nil { 2573 return int64(0) 2574 } 2575 size := int64(0) 2576 if alloc { 2577 size += int64(16) 2578 } 2579 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2580 if cc, ok := cached.Expr.(cachedObject); ok { 2581 size += cc.CachedSize(true) 2582 } 2583 return size 2584 } 2585 func (cached *NotExpr) CachedSize(alloc bool) int64 { 2586 if cached == nil { 2587 return int64(0) 2588 } 2589 size := int64(0) 2590 if alloc { 2591 size += int64(16) 2592 } 2593 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2594 if cc, ok := cached.Expr.(cachedObject); ok { 2595 size += cc.CachedSize(true) 2596 } 2597 return size 2598 } 2599 func (cached *NtileExpr) CachedSize(alloc bool) int64 { 2600 if cached == nil { 2601 return int64(0) 2602 } 2603 size := int64(0) 2604 if alloc { 2605 size += int64(24) 2606 } 2607 // field N vitess.io/vitess/go/vt/sqlparser.Expr 2608 if cc, ok := cached.N.(cachedObject); ok { 2609 size += cc.CachedSize(true) 2610 } 2611 // field OverClause *vitess.io/vitess/go/vt/sqlparser.OverClause 2612 size += cached.OverClause.CachedSize(true) 2613 return size 2614 } 2615 func (cached *Offset) CachedSize(alloc bool) int64 { 2616 if cached == nil { 2617 return int64(0) 2618 } 2619 size := int64(0) 2620 if alloc { 2621 size += int64(24) 2622 } 2623 // field Original string 2624 size += hack.RuntimeAllocSize(int64(len(cached.Original))) 2625 return size 2626 } 2627 func (cached *OptLike) CachedSize(alloc bool) int64 { 2628 if cached == nil { 2629 return int64(0) 2630 } 2631 size := int64(0) 2632 if alloc { 2633 size += int64(32) 2634 } 2635 // field LikeTable vitess.io/vitess/go/vt/sqlparser.TableName 2636 size += cached.LikeTable.CachedSize(false) 2637 return size 2638 } 2639 func (cached *OrExpr) CachedSize(alloc bool) int64 { 2640 if cached == nil { 2641 return int64(0) 2642 } 2643 size := int64(0) 2644 if alloc { 2645 size += int64(32) 2646 } 2647 // field Left vitess.io/vitess/go/vt/sqlparser.Expr 2648 if cc, ok := cached.Left.(cachedObject); ok { 2649 size += cc.CachedSize(true) 2650 } 2651 // field Right vitess.io/vitess/go/vt/sqlparser.Expr 2652 if cc, ok := cached.Right.(cachedObject); ok { 2653 size += cc.CachedSize(true) 2654 } 2655 return size 2656 } 2657 func (cached *Order) CachedSize(alloc bool) int64 { 2658 if cached == nil { 2659 return int64(0) 2660 } 2661 size := int64(0) 2662 if alloc { 2663 size += int64(24) 2664 } 2665 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2666 if cc, ok := cached.Expr.(cachedObject); ok { 2667 size += cc.CachedSize(true) 2668 } 2669 return size 2670 } 2671 func (cached *OrderByOption) CachedSize(alloc bool) int64 { 2672 if cached == nil { 2673 return int64(0) 2674 } 2675 size := int64(0) 2676 if alloc { 2677 size += int64(24) 2678 } 2679 // field Cols vitess.io/vitess/go/vt/sqlparser.Columns 2680 { 2681 size += hack.RuntimeAllocSize(int64(cap(cached.Cols)) * int64(32)) 2682 for _, elem := range cached.Cols { 2683 size += elem.CachedSize(false) 2684 } 2685 } 2686 return size 2687 } 2688 func (cached *OverClause) CachedSize(alloc bool) int64 { 2689 if cached == nil { 2690 return int64(0) 2691 } 2692 size := int64(0) 2693 if alloc { 2694 size += int64(48) 2695 } 2696 // field WindowName vitess.io/vitess/go/vt/sqlparser.IdentifierCI 2697 size += cached.WindowName.CachedSize(false) 2698 // field WindowSpec *vitess.io/vitess/go/vt/sqlparser.WindowSpecification 2699 size += cached.WindowSpec.CachedSize(true) 2700 return size 2701 } 2702 func (cached *ParenTableExpr) CachedSize(alloc bool) int64 { 2703 if cached == nil { 2704 return int64(0) 2705 } 2706 size := int64(0) 2707 if alloc { 2708 size += int64(24) 2709 } 2710 // field Exprs vitess.io/vitess/go/vt/sqlparser.TableExprs 2711 { 2712 size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) 2713 for _, elem := range cached.Exprs { 2714 if cc, ok := elem.(cachedObject); ok { 2715 size += cc.CachedSize(true) 2716 } 2717 } 2718 } 2719 return size 2720 } 2721 func (cached *ParsedComments) CachedSize(alloc bool) int64 { 2722 if cached == nil { 2723 return int64(0) 2724 } 2725 size := int64(0) 2726 if alloc { 2727 size += int64(32) 2728 } 2729 // field comments vitess.io/vitess/go/vt/sqlparser.Comments 2730 { 2731 size += hack.RuntimeAllocSize(int64(cap(cached.comments)) * int64(16)) 2732 for _, elem := range cached.comments { 2733 size += hack.RuntimeAllocSize(int64(len(elem))) 2734 } 2735 } 2736 // field _directives *vitess.io/vitess/go/vt/sqlparser.CommentDirectives 2737 size += cached._directives.CachedSize(true) 2738 return size 2739 } 2740 func (cached *ParsedQuery) CachedSize(alloc bool) int64 { 2741 if cached == nil { 2742 return int64(0) 2743 } 2744 size := int64(0) 2745 if alloc { 2746 size += int64(48) 2747 } 2748 // field Query string 2749 size += hack.RuntimeAllocSize(int64(len(cached.Query))) 2750 // field bindLocations []vitess.io/vitess/go/vt/sqlparser.bindLocation 2751 { 2752 size += hack.RuntimeAllocSize(int64(cap(cached.bindLocations)) * int64(16)) 2753 } 2754 return size 2755 } 2756 func (cached *PartitionDefinition) CachedSize(alloc bool) int64 { 2757 if cached == nil { 2758 return int64(0) 2759 } 2760 size := int64(0) 2761 if alloc { 2762 size += int64(48) 2763 } 2764 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 2765 size += cached.Name.CachedSize(false) 2766 // field Options *vitess.io/vitess/go/vt/sqlparser.PartitionDefinitionOptions 2767 size += cached.Options.CachedSize(true) 2768 return size 2769 } 2770 func (cached *PartitionDefinitionOptions) CachedSize(alloc bool) int64 { 2771 if cached == nil { 2772 return int64(0) 2773 } 2774 size := int64(0) 2775 if alloc { 2776 size += int64(96) 2777 } 2778 // field ValueRange *vitess.io/vitess/go/vt/sqlparser.PartitionValueRange 2779 size += cached.ValueRange.CachedSize(true) 2780 // field Comment *vitess.io/vitess/go/vt/sqlparser.Literal 2781 size += cached.Comment.CachedSize(true) 2782 // field Engine *vitess.io/vitess/go/vt/sqlparser.PartitionEngine 2783 size += cached.Engine.CachedSize(true) 2784 // field DataDirectory *vitess.io/vitess/go/vt/sqlparser.Literal 2785 size += cached.DataDirectory.CachedSize(true) 2786 // field IndexDirectory *vitess.io/vitess/go/vt/sqlparser.Literal 2787 size += cached.IndexDirectory.CachedSize(true) 2788 // field MaxRows *int 2789 size += hack.RuntimeAllocSize(int64(8)) 2790 // field MinRows *int 2791 size += hack.RuntimeAllocSize(int64(8)) 2792 // field TableSpace string 2793 size += hack.RuntimeAllocSize(int64(len(cached.TableSpace))) 2794 // field SubPartitionDefinitions vitess.io/vitess/go/vt/sqlparser.SubPartitionDefinitions 2795 { 2796 size += hack.RuntimeAllocSize(int64(cap(cached.SubPartitionDefinitions)) * int64(8)) 2797 for _, elem := range cached.SubPartitionDefinitions { 2798 size += elem.CachedSize(true) 2799 } 2800 } 2801 return size 2802 } 2803 func (cached *PartitionEngine) CachedSize(alloc bool) int64 { 2804 if cached == nil { 2805 return int64(0) 2806 } 2807 size := int64(0) 2808 if alloc { 2809 size += int64(24) 2810 } 2811 // field Name string 2812 size += hack.RuntimeAllocSize(int64(len(cached.Name))) 2813 return size 2814 } 2815 func (cached *PartitionOption) CachedSize(alloc bool) int64 { 2816 if cached == nil { 2817 return int64(0) 2818 } 2819 size := int64(0) 2820 if alloc { 2821 size += int64(96) 2822 } 2823 // field ColList vitess.io/vitess/go/vt/sqlparser.Columns 2824 { 2825 size += hack.RuntimeAllocSize(int64(cap(cached.ColList)) * int64(32)) 2826 for _, elem := range cached.ColList { 2827 size += elem.CachedSize(false) 2828 } 2829 } 2830 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2831 if cc, ok := cached.Expr.(cachedObject); ok { 2832 size += cc.CachedSize(true) 2833 } 2834 // field SubPartition *vitess.io/vitess/go/vt/sqlparser.SubPartition 2835 size += cached.SubPartition.CachedSize(true) 2836 // field Definitions []*vitess.io/vitess/go/vt/sqlparser.PartitionDefinition 2837 { 2838 size += hack.RuntimeAllocSize(int64(cap(cached.Definitions)) * int64(8)) 2839 for _, elem := range cached.Definitions { 2840 size += elem.CachedSize(true) 2841 } 2842 } 2843 return size 2844 } 2845 func (cached *PartitionSpec) CachedSize(alloc bool) int64 { 2846 if cached == nil { 2847 return int64(0) 2848 } 2849 size := int64(0) 2850 if alloc { 2851 size += int64(112) 2852 } 2853 // field Names vitess.io/vitess/go/vt/sqlparser.Partitions 2854 { 2855 size += hack.RuntimeAllocSize(int64(cap(cached.Names)) * int64(32)) 2856 for _, elem := range cached.Names { 2857 size += elem.CachedSize(false) 2858 } 2859 } 2860 // field Number *vitess.io/vitess/go/vt/sqlparser.Literal 2861 size += cached.Number.CachedSize(true) 2862 // field TableName vitess.io/vitess/go/vt/sqlparser.TableName 2863 size += cached.TableName.CachedSize(false) 2864 // field Definitions []*vitess.io/vitess/go/vt/sqlparser.PartitionDefinition 2865 { 2866 size += hack.RuntimeAllocSize(int64(cap(cached.Definitions)) * int64(8)) 2867 for _, elem := range cached.Definitions { 2868 size += elem.CachedSize(true) 2869 } 2870 } 2871 return size 2872 } 2873 func (cached *PartitionValueRange) CachedSize(alloc bool) int64 { 2874 if cached == nil { 2875 return int64(0) 2876 } 2877 size := int64(0) 2878 if alloc { 2879 size += int64(48) 2880 } 2881 // field Range vitess.io/vitess/go/vt/sqlparser.ValTuple 2882 { 2883 size += hack.RuntimeAllocSize(int64(cap(cached.Range)) * int64(16)) 2884 for _, elem := range cached.Range { 2885 if cc, ok := elem.(cachedObject); ok { 2886 size += cc.CachedSize(true) 2887 } 2888 } 2889 } 2890 return size 2891 } 2892 func (cached *PerformanceSchemaFuncExpr) CachedSize(alloc bool) int64 { 2893 if cached == nil { 2894 return int64(0) 2895 } 2896 size := int64(0) 2897 if alloc { 2898 size += int64(24) 2899 } 2900 // field Argument vitess.io/vitess/go/vt/sqlparser.Expr 2901 if cc, ok := cached.Argument.(cachedObject); ok { 2902 size += cc.CachedSize(true) 2903 } 2904 return size 2905 } 2906 func (cached *PointExpr) CachedSize(alloc bool) int64 { 2907 if cached == nil { 2908 return int64(0) 2909 } 2910 size := int64(0) 2911 if alloc { 2912 size += int64(32) 2913 } 2914 // field XCordinate vitess.io/vitess/go/vt/sqlparser.Expr 2915 if cc, ok := cached.XCordinate.(cachedObject); ok { 2916 size += cc.CachedSize(true) 2917 } 2918 // field YCordinate vitess.io/vitess/go/vt/sqlparser.Expr 2919 if cc, ok := cached.YCordinate.(cachedObject); ok { 2920 size += cc.CachedSize(true) 2921 } 2922 return size 2923 } 2924 func (cached *PrepareStmt) CachedSize(alloc bool) int64 { 2925 if cached == nil { 2926 return int64(0) 2927 } 2928 size := int64(0) 2929 if alloc { 2930 size += int64(64) 2931 } 2932 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 2933 size += cached.Name.CachedSize(false) 2934 // field Statement vitess.io/vitess/go/vt/sqlparser.Expr 2935 if cc, ok := cached.Statement.(cachedObject); ok { 2936 size += cc.CachedSize(true) 2937 } 2938 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 2939 size += cached.Comments.CachedSize(true) 2940 return size 2941 } 2942 func (cached *ReferenceDefinition) CachedSize(alloc bool) int64 { 2943 if cached == nil { 2944 return int64(0) 2945 } 2946 size := int64(0) 2947 if alloc { 2948 size += int64(80) 2949 } 2950 // field ReferencedTable vitess.io/vitess/go/vt/sqlparser.TableName 2951 size += cached.ReferencedTable.CachedSize(false) 2952 // field ReferencedColumns vitess.io/vitess/go/vt/sqlparser.Columns 2953 { 2954 size += hack.RuntimeAllocSize(int64(cap(cached.ReferencedColumns)) * int64(32)) 2955 for _, elem := range cached.ReferencedColumns { 2956 size += elem.CachedSize(false) 2957 } 2958 } 2959 return size 2960 } 2961 func (cached *RegexpInstrExpr) CachedSize(alloc bool) int64 { 2962 if cached == nil { 2963 return int64(0) 2964 } 2965 size := int64(0) 2966 if alloc { 2967 size += int64(96) 2968 } 2969 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 2970 if cc, ok := cached.Expr.(cachedObject); ok { 2971 size += cc.CachedSize(true) 2972 } 2973 // field Pattern vitess.io/vitess/go/vt/sqlparser.Expr 2974 if cc, ok := cached.Pattern.(cachedObject); ok { 2975 size += cc.CachedSize(true) 2976 } 2977 // field Position vitess.io/vitess/go/vt/sqlparser.Expr 2978 if cc, ok := cached.Position.(cachedObject); ok { 2979 size += cc.CachedSize(true) 2980 } 2981 // field Occurrence vitess.io/vitess/go/vt/sqlparser.Expr 2982 if cc, ok := cached.Occurrence.(cachedObject); ok { 2983 size += cc.CachedSize(true) 2984 } 2985 // field ReturnOption vitess.io/vitess/go/vt/sqlparser.Expr 2986 if cc, ok := cached.ReturnOption.(cachedObject); ok { 2987 size += cc.CachedSize(true) 2988 } 2989 // field MatchType vitess.io/vitess/go/vt/sqlparser.Expr 2990 if cc, ok := cached.MatchType.(cachedObject); ok { 2991 size += cc.CachedSize(true) 2992 } 2993 return size 2994 } 2995 func (cached *RegexpLikeExpr) CachedSize(alloc bool) int64 { 2996 if cached == nil { 2997 return int64(0) 2998 } 2999 size := int64(0) 3000 if alloc { 3001 size += int64(48) 3002 } 3003 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 3004 if cc, ok := cached.Expr.(cachedObject); ok { 3005 size += cc.CachedSize(true) 3006 } 3007 // field Pattern vitess.io/vitess/go/vt/sqlparser.Expr 3008 if cc, ok := cached.Pattern.(cachedObject); ok { 3009 size += cc.CachedSize(true) 3010 } 3011 // field MatchType vitess.io/vitess/go/vt/sqlparser.Expr 3012 if cc, ok := cached.MatchType.(cachedObject); ok { 3013 size += cc.CachedSize(true) 3014 } 3015 return size 3016 } 3017 func (cached *RegexpReplaceExpr) CachedSize(alloc bool) int64 { 3018 if cached == nil { 3019 return int64(0) 3020 } 3021 size := int64(0) 3022 if alloc { 3023 size += int64(96) 3024 } 3025 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 3026 if cc, ok := cached.Expr.(cachedObject); ok { 3027 size += cc.CachedSize(true) 3028 } 3029 // field Pattern vitess.io/vitess/go/vt/sqlparser.Expr 3030 if cc, ok := cached.Pattern.(cachedObject); ok { 3031 size += cc.CachedSize(true) 3032 } 3033 // field Repl vitess.io/vitess/go/vt/sqlparser.Expr 3034 if cc, ok := cached.Repl.(cachedObject); ok { 3035 size += cc.CachedSize(true) 3036 } 3037 // field Occurrence vitess.io/vitess/go/vt/sqlparser.Expr 3038 if cc, ok := cached.Occurrence.(cachedObject); ok { 3039 size += cc.CachedSize(true) 3040 } 3041 // field Position vitess.io/vitess/go/vt/sqlparser.Expr 3042 if cc, ok := cached.Position.(cachedObject); ok { 3043 size += cc.CachedSize(true) 3044 } 3045 // field MatchType vitess.io/vitess/go/vt/sqlparser.Expr 3046 if cc, ok := cached.MatchType.(cachedObject); ok { 3047 size += cc.CachedSize(true) 3048 } 3049 return size 3050 } 3051 func (cached *RegexpSubstrExpr) CachedSize(alloc bool) int64 { 3052 if cached == nil { 3053 return int64(0) 3054 } 3055 size := int64(0) 3056 if alloc { 3057 size += int64(80) 3058 } 3059 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 3060 if cc, ok := cached.Expr.(cachedObject); ok { 3061 size += cc.CachedSize(true) 3062 } 3063 // field Pattern vitess.io/vitess/go/vt/sqlparser.Expr 3064 if cc, ok := cached.Pattern.(cachedObject); ok { 3065 size += cc.CachedSize(true) 3066 } 3067 // field Occurrence vitess.io/vitess/go/vt/sqlparser.Expr 3068 if cc, ok := cached.Occurrence.(cachedObject); ok { 3069 size += cc.CachedSize(true) 3070 } 3071 // field Position vitess.io/vitess/go/vt/sqlparser.Expr 3072 if cc, ok := cached.Position.(cachedObject); ok { 3073 size += cc.CachedSize(true) 3074 } 3075 // field MatchType vitess.io/vitess/go/vt/sqlparser.Expr 3076 if cc, ok := cached.MatchType.(cachedObject); ok { 3077 size += cc.CachedSize(true) 3078 } 3079 return size 3080 } 3081 func (cached *Release) CachedSize(alloc bool) int64 { 3082 if cached == nil { 3083 return int64(0) 3084 } 3085 size := int64(0) 3086 if alloc { 3087 size += int64(32) 3088 } 3089 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 3090 size += cached.Name.CachedSize(false) 3091 return size 3092 } 3093 func (cached *RenameColumn) CachedSize(alloc bool) int64 { 3094 if cached == nil { 3095 return int64(0) 3096 } 3097 size := int64(0) 3098 if alloc { 3099 size += int64(16) 3100 } 3101 // field OldName *vitess.io/vitess/go/vt/sqlparser.ColName 3102 size += cached.OldName.CachedSize(true) 3103 // field NewName *vitess.io/vitess/go/vt/sqlparser.ColName 3104 size += cached.NewName.CachedSize(true) 3105 return size 3106 } 3107 func (cached *RenameIndex) CachedSize(alloc bool) int64 { 3108 if cached == nil { 3109 return int64(0) 3110 } 3111 size := int64(0) 3112 if alloc { 3113 size += int64(64) 3114 } 3115 // field OldName vitess.io/vitess/go/vt/sqlparser.IdentifierCI 3116 size += cached.OldName.CachedSize(false) 3117 // field NewName vitess.io/vitess/go/vt/sqlparser.IdentifierCI 3118 size += cached.NewName.CachedSize(false) 3119 return size 3120 } 3121 func (cached *RenameTable) CachedSize(alloc bool) int64 { 3122 if cached == nil { 3123 return int64(0) 3124 } 3125 size := int64(0) 3126 if alloc { 3127 size += int64(24) 3128 } 3129 // field TablePairs []*vitess.io/vitess/go/vt/sqlparser.RenameTablePair 3130 { 3131 size += hack.RuntimeAllocSize(int64(cap(cached.TablePairs)) * int64(8)) 3132 for _, elem := range cached.TablePairs { 3133 size += elem.CachedSize(true) 3134 } 3135 } 3136 return size 3137 } 3138 func (cached *RenameTableName) CachedSize(alloc bool) int64 { 3139 if cached == nil { 3140 return int64(0) 3141 } 3142 size := int64(0) 3143 if alloc { 3144 size += int64(32) 3145 } 3146 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 3147 size += cached.Table.CachedSize(false) 3148 return size 3149 } 3150 func (cached *RenameTablePair) CachedSize(alloc bool) int64 { 3151 if cached == nil { 3152 return int64(0) 3153 } 3154 size := int64(0) 3155 if alloc { 3156 size += int64(64) 3157 } 3158 // field FromTable vitess.io/vitess/go/vt/sqlparser.TableName 3159 size += cached.FromTable.CachedSize(false) 3160 // field ToTable vitess.io/vitess/go/vt/sqlparser.TableName 3161 size += cached.ToTable.CachedSize(false) 3162 return size 3163 } 3164 func (cached *RevertMigration) CachedSize(alloc bool) int64 { 3165 if cached == nil { 3166 return int64(0) 3167 } 3168 size := int64(0) 3169 if alloc { 3170 size += int64(24) 3171 } 3172 // field UUID string 3173 size += hack.RuntimeAllocSize(int64(len(cached.UUID))) 3174 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 3175 size += cached.Comments.CachedSize(true) 3176 return size 3177 } 3178 func (cached *SRollback) CachedSize(alloc bool) int64 { 3179 if cached == nil { 3180 return int64(0) 3181 } 3182 size := int64(0) 3183 if alloc { 3184 size += int64(32) 3185 } 3186 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 3187 size += cached.Name.CachedSize(false) 3188 return size 3189 } 3190 func (cached *Savepoint) CachedSize(alloc bool) int64 { 3191 if cached == nil { 3192 return int64(0) 3193 } 3194 size := int64(0) 3195 if alloc { 3196 size += int64(32) 3197 } 3198 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 3199 size += cached.Name.CachedSize(false) 3200 return size 3201 } 3202 func (cached *Select) CachedSize(alloc bool) int64 { 3203 if cached == nil { 3204 return int64(0) 3205 } 3206 size := int64(0) 3207 if alloc { 3208 size += int64(192) 3209 } 3210 // field Cache *bool 3211 size += hack.RuntimeAllocSize(int64(1)) 3212 // field From []vitess.io/vitess/go/vt/sqlparser.TableExpr 3213 { 3214 size += hack.RuntimeAllocSize(int64(cap(cached.From)) * int64(16)) 3215 for _, elem := range cached.From { 3216 if cc, ok := elem.(cachedObject); ok { 3217 size += cc.CachedSize(true) 3218 } 3219 } 3220 } 3221 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 3222 size += cached.Comments.CachedSize(true) 3223 // field SelectExprs vitess.io/vitess/go/vt/sqlparser.SelectExprs 3224 { 3225 size += hack.RuntimeAllocSize(int64(cap(cached.SelectExprs)) * int64(16)) 3226 for _, elem := range cached.SelectExprs { 3227 if cc, ok := elem.(cachedObject); ok { 3228 size += cc.CachedSize(true) 3229 } 3230 } 3231 } 3232 // field Where *vitess.io/vitess/go/vt/sqlparser.Where 3233 size += cached.Where.CachedSize(true) 3234 // field With *vitess.io/vitess/go/vt/sqlparser.With 3235 size += cached.With.CachedSize(true) 3236 // field GroupBy vitess.io/vitess/go/vt/sqlparser.GroupBy 3237 { 3238 size += hack.RuntimeAllocSize(int64(cap(cached.GroupBy)) * int64(16)) 3239 for _, elem := range cached.GroupBy { 3240 if cc, ok := elem.(cachedObject); ok { 3241 size += cc.CachedSize(true) 3242 } 3243 } 3244 } 3245 // field Having *vitess.io/vitess/go/vt/sqlparser.Where 3246 size += cached.Having.CachedSize(true) 3247 // field Windows vitess.io/vitess/go/vt/sqlparser.NamedWindows 3248 { 3249 size += hack.RuntimeAllocSize(int64(cap(cached.Windows)) * int64(8)) 3250 for _, elem := range cached.Windows { 3251 size += elem.CachedSize(true) 3252 } 3253 } 3254 // field OrderBy vitess.io/vitess/go/vt/sqlparser.OrderBy 3255 { 3256 size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(8)) 3257 for _, elem := range cached.OrderBy { 3258 size += elem.CachedSize(true) 3259 } 3260 } 3261 // field Limit *vitess.io/vitess/go/vt/sqlparser.Limit 3262 size += cached.Limit.CachedSize(true) 3263 // field Into *vitess.io/vitess/go/vt/sqlparser.SelectInto 3264 size += cached.Into.CachedSize(true) 3265 return size 3266 } 3267 func (cached *SelectInto) CachedSize(alloc bool) int64 { 3268 if cached == nil { 3269 return int64(0) 3270 } 3271 size := int64(0) 3272 if alloc { 3273 size += int64(112) 3274 } 3275 // field FileName string 3276 size += hack.RuntimeAllocSize(int64(len(cached.FileName))) 3277 // field Charset vitess.io/vitess/go/vt/sqlparser.ColumnCharset 3278 size += cached.Charset.CachedSize(false) 3279 // field FormatOption string 3280 size += hack.RuntimeAllocSize(int64(len(cached.FormatOption))) 3281 // field ExportOption string 3282 size += hack.RuntimeAllocSize(int64(len(cached.ExportOption))) 3283 // field Manifest string 3284 size += hack.RuntimeAllocSize(int64(len(cached.Manifest))) 3285 // field Overwrite string 3286 size += hack.RuntimeAllocSize(int64(len(cached.Overwrite))) 3287 return size 3288 } 3289 func (cached *Set) CachedSize(alloc bool) int64 { 3290 if cached == nil { 3291 return int64(0) 3292 } 3293 size := int64(0) 3294 if alloc { 3295 size += int64(32) 3296 } 3297 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 3298 size += cached.Comments.CachedSize(true) 3299 // field Exprs vitess.io/vitess/go/vt/sqlparser.SetExprs 3300 { 3301 size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(8)) 3302 for _, elem := range cached.Exprs { 3303 size += elem.CachedSize(true) 3304 } 3305 } 3306 return size 3307 } 3308 func (cached *SetExpr) CachedSize(alloc bool) int64 { 3309 if cached == nil { 3310 return int64(0) 3311 } 3312 size := int64(0) 3313 if alloc { 3314 size += int64(24) 3315 } 3316 // field Var *vitess.io/vitess/go/vt/sqlparser.Variable 3317 size += cached.Var.CachedSize(true) 3318 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 3319 if cc, ok := cached.Expr.(cachedObject); ok { 3320 size += cc.CachedSize(true) 3321 } 3322 return size 3323 } 3324 func (cached *Show) CachedSize(alloc bool) int64 { 3325 if cached == nil { 3326 return int64(0) 3327 } 3328 size := int64(0) 3329 if alloc { 3330 size += int64(16) 3331 } 3332 // field Internal vitess.io/vitess/go/vt/sqlparser.ShowInternal 3333 if cc, ok := cached.Internal.(cachedObject); ok { 3334 size += cc.CachedSize(true) 3335 } 3336 return size 3337 } 3338 func (cached *ShowBasic) CachedSize(alloc bool) int64 { 3339 if cached == nil { 3340 return int64(0) 3341 } 3342 size := int64(0) 3343 if alloc { 3344 size += int64(64) 3345 } 3346 // field Tbl vitess.io/vitess/go/vt/sqlparser.TableName 3347 size += cached.Tbl.CachedSize(false) 3348 // field DbName vitess.io/vitess/go/vt/sqlparser.IdentifierCS 3349 size += cached.DbName.CachedSize(false) 3350 // field Filter *vitess.io/vitess/go/vt/sqlparser.ShowFilter 3351 size += cached.Filter.CachedSize(true) 3352 return size 3353 } 3354 func (cached *ShowCreate) CachedSize(alloc bool) int64 { 3355 if cached == nil { 3356 return int64(0) 3357 } 3358 size := int64(0) 3359 if alloc { 3360 size += int64(48) 3361 } 3362 // field Op vitess.io/vitess/go/vt/sqlparser.TableName 3363 size += cached.Op.CachedSize(false) 3364 return size 3365 } 3366 func (cached *ShowFilter) CachedSize(alloc bool) int64 { 3367 if cached == nil { 3368 return int64(0) 3369 } 3370 size := int64(0) 3371 if alloc { 3372 size += int64(32) 3373 } 3374 // field Like string 3375 size += hack.RuntimeAllocSize(int64(len(cached.Like))) 3376 // field Filter vitess.io/vitess/go/vt/sqlparser.Expr 3377 if cc, ok := cached.Filter.(cachedObject); ok { 3378 size += cc.CachedSize(true) 3379 } 3380 return size 3381 } 3382 func (cached *ShowMigrationLogs) CachedSize(alloc bool) int64 { 3383 if cached == nil { 3384 return int64(0) 3385 } 3386 size := int64(0) 3387 if alloc { 3388 size += int64(24) 3389 } 3390 // field UUID string 3391 size += hack.RuntimeAllocSize(int64(len(cached.UUID))) 3392 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 3393 size += cached.Comments.CachedSize(true) 3394 return size 3395 } 3396 func (cached *ShowOther) CachedSize(alloc bool) int64 { 3397 if cached == nil { 3398 return int64(0) 3399 } 3400 size := int64(0) 3401 if alloc { 3402 size += int64(16) 3403 } 3404 // field Command string 3405 size += hack.RuntimeAllocSize(int64(len(cached.Command))) 3406 return size 3407 } 3408 func (cached *ShowThrottledApps) CachedSize(alloc bool) int64 { 3409 if cached == nil { 3410 return int64(0) 3411 } 3412 size := int64(0) 3413 if alloc { 3414 size += int64(24) 3415 } 3416 // field Comments vitess.io/vitess/go/vt/sqlparser.Comments 3417 { 3418 size += hack.RuntimeAllocSize(int64(cap(cached.Comments)) * int64(16)) 3419 for _, elem := range cached.Comments { 3420 size += hack.RuntimeAllocSize(int64(len(elem))) 3421 } 3422 } 3423 return size 3424 } 3425 func (cached *ShowThrottlerStatus) CachedSize(alloc bool) int64 { 3426 if cached == nil { 3427 return int64(0) 3428 } 3429 size := int64(0) 3430 if alloc { 3431 size += int64(24) 3432 } 3433 // field Comments vitess.io/vitess/go/vt/sqlparser.Comments 3434 { 3435 size += hack.RuntimeAllocSize(int64(cap(cached.Comments)) * int64(16)) 3436 for _, elem := range cached.Comments { 3437 size += hack.RuntimeAllocSize(int64(len(elem))) 3438 } 3439 } 3440 return size 3441 } 3442 func (cached *StarExpr) CachedSize(alloc bool) int64 { 3443 if cached == nil { 3444 return int64(0) 3445 } 3446 size := int64(0) 3447 if alloc { 3448 size += int64(32) 3449 } 3450 // field TableName vitess.io/vitess/go/vt/sqlparser.TableName 3451 size += cached.TableName.CachedSize(false) 3452 return size 3453 } 3454 func (cached *Std) CachedSize(alloc bool) int64 { 3455 if cached == nil { 3456 return int64(0) 3457 } 3458 size := int64(0) 3459 if alloc { 3460 size += int64(16) 3461 } 3462 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 3463 if cc, ok := cached.Arg.(cachedObject); ok { 3464 size += cc.CachedSize(true) 3465 } 3466 return size 3467 } 3468 func (cached *StdDev) CachedSize(alloc bool) int64 { 3469 if cached == nil { 3470 return int64(0) 3471 } 3472 size := int64(0) 3473 if alloc { 3474 size += int64(16) 3475 } 3476 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 3477 if cc, ok := cached.Arg.(cachedObject); ok { 3478 size += cc.CachedSize(true) 3479 } 3480 return size 3481 } 3482 func (cached *StdPop) CachedSize(alloc bool) int64 { 3483 if cached == nil { 3484 return int64(0) 3485 } 3486 size := int64(0) 3487 if alloc { 3488 size += int64(16) 3489 } 3490 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 3491 if cc, ok := cached.Arg.(cachedObject); ok { 3492 size += cc.CachedSize(true) 3493 } 3494 return size 3495 } 3496 func (cached *StdSamp) CachedSize(alloc bool) int64 { 3497 if cached == nil { 3498 return int64(0) 3499 } 3500 size := int64(0) 3501 if alloc { 3502 size += int64(16) 3503 } 3504 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 3505 if cc, ok := cached.Arg.(cachedObject); ok { 3506 size += cc.CachedSize(true) 3507 } 3508 return size 3509 } 3510 func (cached *Stream) CachedSize(alloc bool) int64 { 3511 if cached == nil { 3512 return int64(0) 3513 } 3514 size := int64(0) 3515 if alloc { 3516 size += int64(64) 3517 } 3518 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 3519 size += cached.Comments.CachedSize(true) 3520 // field SelectExpr vitess.io/vitess/go/vt/sqlparser.SelectExpr 3521 if cc, ok := cached.SelectExpr.(cachedObject); ok { 3522 size += cc.CachedSize(true) 3523 } 3524 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 3525 size += cached.Table.CachedSize(false) 3526 return size 3527 } 3528 func (cached *SubPartition) CachedSize(alloc bool) int64 { 3529 if cached == nil { 3530 return int64(0) 3531 } 3532 size := int64(0) 3533 if alloc { 3534 size += int64(64) 3535 } 3536 // field ColList vitess.io/vitess/go/vt/sqlparser.Columns 3537 { 3538 size += hack.RuntimeAllocSize(int64(cap(cached.ColList)) * int64(32)) 3539 for _, elem := range cached.ColList { 3540 size += elem.CachedSize(false) 3541 } 3542 } 3543 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 3544 if cc, ok := cached.Expr.(cachedObject); ok { 3545 size += cc.CachedSize(true) 3546 } 3547 return size 3548 } 3549 func (cached *SubPartitionDefinition) CachedSize(alloc bool) int64 { 3550 if cached == nil { 3551 return int64(0) 3552 } 3553 size := int64(0) 3554 if alloc { 3555 size += int64(48) 3556 } 3557 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 3558 size += cached.Name.CachedSize(false) 3559 // field Options *vitess.io/vitess/go/vt/sqlparser.SubPartitionDefinitionOptions 3560 size += cached.Options.CachedSize(true) 3561 return size 3562 } 3563 func (cached *SubPartitionDefinitionOptions) CachedSize(alloc bool) int64 { 3564 if cached == nil { 3565 return int64(0) 3566 } 3567 size := int64(0) 3568 if alloc { 3569 size += int64(64) 3570 } 3571 // field Comment *vitess.io/vitess/go/vt/sqlparser.Literal 3572 size += cached.Comment.CachedSize(true) 3573 // field Engine *vitess.io/vitess/go/vt/sqlparser.PartitionEngine 3574 size += cached.Engine.CachedSize(true) 3575 // field DataDirectory *vitess.io/vitess/go/vt/sqlparser.Literal 3576 size += cached.DataDirectory.CachedSize(true) 3577 // field IndexDirectory *vitess.io/vitess/go/vt/sqlparser.Literal 3578 size += cached.IndexDirectory.CachedSize(true) 3579 // field MaxRows *int 3580 size += hack.RuntimeAllocSize(int64(8)) 3581 // field MinRows *int 3582 size += hack.RuntimeAllocSize(int64(8)) 3583 // field TableSpace string 3584 size += hack.RuntimeAllocSize(int64(len(cached.TableSpace))) 3585 return size 3586 } 3587 func (cached *Subquery) CachedSize(alloc bool) int64 { 3588 if cached == nil { 3589 return int64(0) 3590 } 3591 size := int64(0) 3592 if alloc { 3593 size += int64(16) 3594 } 3595 // field Select vitess.io/vitess/go/vt/sqlparser.SelectStatement 3596 if cc, ok := cached.Select.(cachedObject); ok { 3597 size += cc.CachedSize(true) 3598 } 3599 return size 3600 } 3601 func (cached *SubstrExpr) CachedSize(alloc bool) int64 { 3602 if cached == nil { 3603 return int64(0) 3604 } 3605 size := int64(0) 3606 if alloc { 3607 size += int64(48) 3608 } 3609 // field Name vitess.io/vitess/go/vt/sqlparser.Expr 3610 if cc, ok := cached.Name.(cachedObject); ok { 3611 size += cc.CachedSize(true) 3612 } 3613 // field From vitess.io/vitess/go/vt/sqlparser.Expr 3614 if cc, ok := cached.From.(cachedObject); ok { 3615 size += cc.CachedSize(true) 3616 } 3617 // field To vitess.io/vitess/go/vt/sqlparser.Expr 3618 if cc, ok := cached.To.(cachedObject); ok { 3619 size += cc.CachedSize(true) 3620 } 3621 return size 3622 } 3623 func (cached *Sum) CachedSize(alloc bool) int64 { 3624 if cached == nil { 3625 return int64(0) 3626 } 3627 size := int64(0) 3628 if alloc { 3629 size += int64(24) 3630 } 3631 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 3632 if cc, ok := cached.Arg.(cachedObject); ok { 3633 size += cc.CachedSize(true) 3634 } 3635 return size 3636 } 3637 func (cached *TableAndLockType) CachedSize(alloc bool) int64 { 3638 if cached == nil { 3639 return int64(0) 3640 } 3641 size := int64(0) 3642 if alloc { 3643 size += int64(24) 3644 } 3645 // field Table vitess.io/vitess/go/vt/sqlparser.TableExpr 3646 if cc, ok := cached.Table.(cachedObject); ok { 3647 size += cc.CachedSize(true) 3648 } 3649 return size 3650 } 3651 func (cached *TableName) CachedSize(alloc bool) int64 { 3652 if cached == nil { 3653 return int64(0) 3654 } 3655 size := int64(0) 3656 if alloc { 3657 size += int64(32) 3658 } 3659 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCS 3660 size += cached.Name.CachedSize(false) 3661 // field Qualifier vitess.io/vitess/go/vt/sqlparser.IdentifierCS 3662 size += cached.Qualifier.CachedSize(false) 3663 return size 3664 } 3665 func (cached *TableOption) CachedSize(alloc bool) int64 { 3666 if cached == nil { 3667 return int64(0) 3668 } 3669 size := int64(0) 3670 if alloc { 3671 size += int64(80) 3672 } 3673 // field Name string 3674 size += hack.RuntimeAllocSize(int64(len(cached.Name))) 3675 // field Value *vitess.io/vitess/go/vt/sqlparser.Literal 3676 size += cached.Value.CachedSize(true) 3677 // field String string 3678 size += hack.RuntimeAllocSize(int64(len(cached.String))) 3679 // field Tables vitess.io/vitess/go/vt/sqlparser.TableNames 3680 { 3681 size += hack.RuntimeAllocSize(int64(cap(cached.Tables)) * int64(32)) 3682 for _, elem := range cached.Tables { 3683 size += elem.CachedSize(false) 3684 } 3685 } 3686 return size 3687 } 3688 func (cached *TableSpec) CachedSize(alloc bool) int64 { 3689 if cached == nil { 3690 return int64(0) 3691 } 3692 size := int64(0) 3693 if alloc { 3694 size += int64(112) 3695 } 3696 // field Columns []*vitess.io/vitess/go/vt/sqlparser.ColumnDefinition 3697 { 3698 size += hack.RuntimeAllocSize(int64(cap(cached.Columns)) * int64(8)) 3699 for _, elem := range cached.Columns { 3700 size += elem.CachedSize(true) 3701 } 3702 } 3703 // field Indexes []*vitess.io/vitess/go/vt/sqlparser.IndexDefinition 3704 { 3705 size += hack.RuntimeAllocSize(int64(cap(cached.Indexes)) * int64(8)) 3706 for _, elem := range cached.Indexes { 3707 size += elem.CachedSize(true) 3708 } 3709 } 3710 // field Constraints []*vitess.io/vitess/go/vt/sqlparser.ConstraintDefinition 3711 { 3712 size += hack.RuntimeAllocSize(int64(cap(cached.Constraints)) * int64(8)) 3713 for _, elem := range cached.Constraints { 3714 size += elem.CachedSize(true) 3715 } 3716 } 3717 // field Options vitess.io/vitess/go/vt/sqlparser.TableOptions 3718 { 3719 size += hack.RuntimeAllocSize(int64(cap(cached.Options)) * int64(8)) 3720 for _, elem := range cached.Options { 3721 size += elem.CachedSize(true) 3722 } 3723 } 3724 // field PartitionOption *vitess.io/vitess/go/vt/sqlparser.PartitionOption 3725 size += cached.PartitionOption.CachedSize(true) 3726 return size 3727 } 3728 func (cached *TablespaceOperation) CachedSize(alloc bool) int64 { 3729 if cached == nil { 3730 return int64(0) 3731 } 3732 size := int64(0) 3733 if alloc { 3734 size += int64(8) 3735 } 3736 return size 3737 } 3738 func (cached *TimestampFuncExpr) CachedSize(alloc bool) int64 { 3739 if cached == nil { 3740 return int64(0) 3741 } 3742 size := int64(0) 3743 if alloc { 3744 size += int64(64) 3745 } 3746 // field Name string 3747 size += hack.RuntimeAllocSize(int64(len(cached.Name))) 3748 // field Expr1 vitess.io/vitess/go/vt/sqlparser.Expr 3749 if cc, ok := cached.Expr1.(cachedObject); ok { 3750 size += cc.CachedSize(true) 3751 } 3752 // field Expr2 vitess.io/vitess/go/vt/sqlparser.Expr 3753 if cc, ok := cached.Expr2.(cachedObject); ok { 3754 size += cc.CachedSize(true) 3755 } 3756 // field Unit string 3757 size += hack.RuntimeAllocSize(int64(len(cached.Unit))) 3758 return size 3759 } 3760 func (cached *TrimFuncExpr) CachedSize(alloc bool) int64 { 3761 if cached == nil { 3762 return int64(0) 3763 } 3764 size := int64(0) 3765 if alloc { 3766 size += int64(48) 3767 } 3768 // field TrimArg vitess.io/vitess/go/vt/sqlparser.Expr 3769 if cc, ok := cached.TrimArg.(cachedObject); ok { 3770 size += cc.CachedSize(true) 3771 } 3772 // field StringArg vitess.io/vitess/go/vt/sqlparser.Expr 3773 if cc, ok := cached.StringArg.(cachedObject); ok { 3774 size += cc.CachedSize(true) 3775 } 3776 return size 3777 } 3778 func (cached *TruncateTable) CachedSize(alloc bool) int64 { 3779 if cached == nil { 3780 return int64(0) 3781 } 3782 size := int64(0) 3783 if alloc { 3784 size += int64(32) 3785 } 3786 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 3787 size += cached.Table.CachedSize(false) 3788 return size 3789 } 3790 func (cached *UnaryExpr) CachedSize(alloc bool) int64 { 3791 if cached == nil { 3792 return int64(0) 3793 } 3794 size := int64(0) 3795 if alloc { 3796 size += int64(24) 3797 } 3798 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 3799 if cc, ok := cached.Expr.(cachedObject); ok { 3800 size += cc.CachedSize(true) 3801 } 3802 return size 3803 } 3804 func (cached *Union) CachedSize(alloc bool) int64 { 3805 if cached == nil { 3806 return int64(0) 3807 } 3808 size := int64(0) 3809 if alloc { 3810 size += int64(96) 3811 } 3812 // field Left vitess.io/vitess/go/vt/sqlparser.SelectStatement 3813 if cc, ok := cached.Left.(cachedObject); ok { 3814 size += cc.CachedSize(true) 3815 } 3816 // field Right vitess.io/vitess/go/vt/sqlparser.SelectStatement 3817 if cc, ok := cached.Right.(cachedObject); ok { 3818 size += cc.CachedSize(true) 3819 } 3820 // field OrderBy vitess.io/vitess/go/vt/sqlparser.OrderBy 3821 { 3822 size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(8)) 3823 for _, elem := range cached.OrderBy { 3824 size += elem.CachedSize(true) 3825 } 3826 } 3827 // field With *vitess.io/vitess/go/vt/sqlparser.With 3828 size += cached.With.CachedSize(true) 3829 // field Limit *vitess.io/vitess/go/vt/sqlparser.Limit 3830 size += cached.Limit.CachedSize(true) 3831 // field Into *vitess.io/vitess/go/vt/sqlparser.SelectInto 3832 size += cached.Into.CachedSize(true) 3833 return size 3834 } 3835 func (cached *Update) CachedSize(alloc bool) int64 { 3836 if cached == nil { 3837 return int64(0) 3838 } 3839 size := int64(0) 3840 if alloc { 3841 size += int64(112) 3842 } 3843 // field With *vitess.io/vitess/go/vt/sqlparser.With 3844 size += cached.With.CachedSize(true) 3845 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 3846 size += cached.Comments.CachedSize(true) 3847 // field TableExprs vitess.io/vitess/go/vt/sqlparser.TableExprs 3848 { 3849 size += hack.RuntimeAllocSize(int64(cap(cached.TableExprs)) * int64(16)) 3850 for _, elem := range cached.TableExprs { 3851 if cc, ok := elem.(cachedObject); ok { 3852 size += cc.CachedSize(true) 3853 } 3854 } 3855 } 3856 // field Exprs vitess.io/vitess/go/vt/sqlparser.UpdateExprs 3857 { 3858 size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(8)) 3859 for _, elem := range cached.Exprs { 3860 size += elem.CachedSize(true) 3861 } 3862 } 3863 // field Where *vitess.io/vitess/go/vt/sqlparser.Where 3864 size += cached.Where.CachedSize(true) 3865 // field OrderBy vitess.io/vitess/go/vt/sqlparser.OrderBy 3866 { 3867 size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(8)) 3868 for _, elem := range cached.OrderBy { 3869 size += elem.CachedSize(true) 3870 } 3871 } 3872 // field Limit *vitess.io/vitess/go/vt/sqlparser.Limit 3873 size += cached.Limit.CachedSize(true) 3874 return size 3875 } 3876 func (cached *UpdateExpr) CachedSize(alloc bool) int64 { 3877 if cached == nil { 3878 return int64(0) 3879 } 3880 size := int64(0) 3881 if alloc { 3882 size += int64(24) 3883 } 3884 // field Name *vitess.io/vitess/go/vt/sqlparser.ColName 3885 size += cached.Name.CachedSize(true) 3886 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 3887 if cc, ok := cached.Expr.(cachedObject); ok { 3888 size += cc.CachedSize(true) 3889 } 3890 return size 3891 } 3892 func (cached *UpdateXMLExpr) CachedSize(alloc bool) int64 { 3893 if cached == nil { 3894 return int64(0) 3895 } 3896 size := int64(0) 3897 if alloc { 3898 size += int64(48) 3899 } 3900 // field Target vitess.io/vitess/go/vt/sqlparser.Expr 3901 if cc, ok := cached.Target.(cachedObject); ok { 3902 size += cc.CachedSize(true) 3903 } 3904 // field XPathExpr vitess.io/vitess/go/vt/sqlparser.Expr 3905 if cc, ok := cached.XPathExpr.(cachedObject); ok { 3906 size += cc.CachedSize(true) 3907 } 3908 // field NewXML vitess.io/vitess/go/vt/sqlparser.Expr 3909 if cc, ok := cached.NewXML.(cachedObject); ok { 3910 size += cc.CachedSize(true) 3911 } 3912 return size 3913 } 3914 func (cached *Use) CachedSize(alloc bool) int64 { 3915 if cached == nil { 3916 return int64(0) 3917 } 3918 size := int64(0) 3919 if alloc { 3920 size += int64(16) 3921 } 3922 // field DBName vitess.io/vitess/go/vt/sqlparser.IdentifierCS 3923 size += cached.DBName.CachedSize(false) 3924 return size 3925 } 3926 func (cached *VExplainStmt) CachedSize(alloc bool) int64 { 3927 if cached == nil { 3928 return int64(0) 3929 } 3930 size := int64(0) 3931 if alloc { 3932 size += int64(32) 3933 } 3934 // field Statement vitess.io/vitess/go/vt/sqlparser.Statement 3935 if cc, ok := cached.Statement.(cachedObject); ok { 3936 size += cc.CachedSize(true) 3937 } 3938 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 3939 size += cached.Comments.CachedSize(true) 3940 return size 3941 } 3942 func (cached *VStream) CachedSize(alloc bool) int64 { 3943 if cached == nil { 3944 return int64(0) 3945 } 3946 size := int64(0) 3947 if alloc { 3948 size += int64(80) 3949 } 3950 // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments 3951 size += cached.Comments.CachedSize(true) 3952 // field SelectExpr vitess.io/vitess/go/vt/sqlparser.SelectExpr 3953 if cc, ok := cached.SelectExpr.(cachedObject); ok { 3954 size += cc.CachedSize(true) 3955 } 3956 // field Table vitess.io/vitess/go/vt/sqlparser.TableName 3957 size += cached.Table.CachedSize(false) 3958 // field Where *vitess.io/vitess/go/vt/sqlparser.Where 3959 size += cached.Where.CachedSize(true) 3960 // field Limit *vitess.io/vitess/go/vt/sqlparser.Limit 3961 size += cached.Limit.CachedSize(true) 3962 return size 3963 } 3964 func (cached *Validation) CachedSize(alloc bool) int64 { 3965 if cached == nil { 3966 return int64(0) 3967 } 3968 size := int64(0) 3969 if alloc { 3970 size += int64(8) 3971 } 3972 return size 3973 } 3974 func (cached *ValuesFuncExpr) CachedSize(alloc bool) int64 { 3975 if cached == nil { 3976 return int64(0) 3977 } 3978 size := int64(0) 3979 if alloc { 3980 size += int64(8) 3981 } 3982 // field Name *vitess.io/vitess/go/vt/sqlparser.ColName 3983 size += cached.Name.CachedSize(true) 3984 return size 3985 } 3986 func (cached *VarPop) CachedSize(alloc bool) int64 { 3987 if cached == nil { 3988 return int64(0) 3989 } 3990 size := int64(0) 3991 if alloc { 3992 size += int64(16) 3993 } 3994 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 3995 if cc, ok := cached.Arg.(cachedObject); ok { 3996 size += cc.CachedSize(true) 3997 } 3998 return size 3999 } 4000 func (cached *VarSamp) CachedSize(alloc bool) int64 { 4001 if cached == nil { 4002 return int64(0) 4003 } 4004 size := int64(0) 4005 if alloc { 4006 size += int64(16) 4007 } 4008 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 4009 if cc, ok := cached.Arg.(cachedObject); ok { 4010 size += cc.CachedSize(true) 4011 } 4012 return size 4013 } 4014 func (cached *Variable) CachedSize(alloc bool) int64 { 4015 if cached == nil { 4016 return int64(0) 4017 } 4018 size := int64(0) 4019 if alloc { 4020 size += int64(48) 4021 } 4022 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 4023 size += cached.Name.CachedSize(false) 4024 return size 4025 } 4026 func (cached *Variance) CachedSize(alloc bool) int64 { 4027 if cached == nil { 4028 return int64(0) 4029 } 4030 size := int64(0) 4031 if alloc { 4032 size += int64(16) 4033 } 4034 // field Arg vitess.io/vitess/go/vt/sqlparser.Expr 4035 if cc, ok := cached.Arg.(cachedObject); ok { 4036 size += cc.CachedSize(true) 4037 } 4038 return size 4039 } 4040 func (cached *VindexParam) CachedSize(alloc bool) int64 { 4041 if cached == nil { 4042 return int64(0) 4043 } 4044 size := int64(0) 4045 if alloc { 4046 size += int64(48) 4047 } 4048 // field Key vitess.io/vitess/go/vt/sqlparser.IdentifierCI 4049 size += cached.Key.CachedSize(false) 4050 // field Val string 4051 size += hack.RuntimeAllocSize(int64(len(cached.Val))) 4052 return size 4053 } 4054 func (cached *VindexSpec) CachedSize(alloc bool) int64 { 4055 if cached == nil { 4056 return int64(0) 4057 } 4058 size := int64(0) 4059 if alloc { 4060 size += int64(96) 4061 } 4062 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 4063 size += cached.Name.CachedSize(false) 4064 // field Type vitess.io/vitess/go/vt/sqlparser.IdentifierCI 4065 size += cached.Type.CachedSize(false) 4066 // field Params []vitess.io/vitess/go/vt/sqlparser.VindexParam 4067 { 4068 size += hack.RuntimeAllocSize(int64(cap(cached.Params)) * int64(48)) 4069 for _, elem := range cached.Params { 4070 size += elem.CachedSize(false) 4071 } 4072 } 4073 return size 4074 } 4075 func (cached *WeightStringFuncExpr) CachedSize(alloc bool) int64 { 4076 if cached == nil { 4077 return int64(0) 4078 } 4079 size := int64(0) 4080 if alloc { 4081 size += int64(24) 4082 } 4083 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 4084 if cc, ok := cached.Expr.(cachedObject); ok { 4085 size += cc.CachedSize(true) 4086 } 4087 // field As *vitess.io/vitess/go/vt/sqlparser.ConvertType 4088 size += cached.As.CachedSize(true) 4089 return size 4090 } 4091 func (cached *When) CachedSize(alloc bool) int64 { 4092 if cached == nil { 4093 return int64(0) 4094 } 4095 size := int64(0) 4096 if alloc { 4097 size += int64(32) 4098 } 4099 // field Cond vitess.io/vitess/go/vt/sqlparser.Expr 4100 if cc, ok := cached.Cond.(cachedObject); ok { 4101 size += cc.CachedSize(true) 4102 } 4103 // field Val vitess.io/vitess/go/vt/sqlparser.Expr 4104 if cc, ok := cached.Val.(cachedObject); ok { 4105 size += cc.CachedSize(true) 4106 } 4107 return size 4108 } 4109 func (cached *Where) CachedSize(alloc bool) int64 { 4110 if cached == nil { 4111 return int64(0) 4112 } 4113 size := int64(0) 4114 if alloc { 4115 size += int64(24) 4116 } 4117 // field Expr vitess.io/vitess/go/vt/sqlparser.Expr 4118 if cc, ok := cached.Expr.(cachedObject); ok { 4119 size += cc.CachedSize(true) 4120 } 4121 return size 4122 } 4123 func (cached *WindowDefinition) CachedSize(alloc bool) int64 { 4124 if cached == nil { 4125 return int64(0) 4126 } 4127 size := int64(0) 4128 if alloc { 4129 size += int64(48) 4130 } 4131 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 4132 size += cached.Name.CachedSize(false) 4133 // field WindowSpec *vitess.io/vitess/go/vt/sqlparser.WindowSpecification 4134 size += cached.WindowSpec.CachedSize(true) 4135 return size 4136 } 4137 func (cached *WindowSpecification) CachedSize(alloc bool) int64 { 4138 if cached == nil { 4139 return int64(0) 4140 } 4141 size := int64(0) 4142 if alloc { 4143 size += int64(96) 4144 } 4145 // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI 4146 size += cached.Name.CachedSize(false) 4147 // field PartitionClause vitess.io/vitess/go/vt/sqlparser.Exprs 4148 { 4149 size += hack.RuntimeAllocSize(int64(cap(cached.PartitionClause)) * int64(16)) 4150 for _, elem := range cached.PartitionClause { 4151 if cc, ok := elem.(cachedObject); ok { 4152 size += cc.CachedSize(true) 4153 } 4154 } 4155 } 4156 // field OrderClause vitess.io/vitess/go/vt/sqlparser.OrderBy 4157 { 4158 size += hack.RuntimeAllocSize(int64(cap(cached.OrderClause)) * int64(8)) 4159 for _, elem := range cached.OrderClause { 4160 size += elem.CachedSize(true) 4161 } 4162 } 4163 // field FrameClause *vitess.io/vitess/go/vt/sqlparser.FrameClause 4164 size += cached.FrameClause.CachedSize(true) 4165 return size 4166 } 4167 func (cached *With) CachedSize(alloc bool) int64 { 4168 if cached == nil { 4169 return int64(0) 4170 } 4171 size := int64(0) 4172 if alloc { 4173 size += int64(32) 4174 } 4175 // field ctes []*vitess.io/vitess/go/vt/sqlparser.CommonTableExpr 4176 { 4177 size += hack.RuntimeAllocSize(int64(cap(cached.Ctes)) * int64(8)) 4178 for _, elem := range cached.Ctes { 4179 size += elem.CachedSize(true) 4180 } 4181 } 4182 return size 4183 } 4184 func (cached *XorExpr) CachedSize(alloc bool) int64 { 4185 if cached == nil { 4186 return int64(0) 4187 } 4188 size := int64(0) 4189 if alloc { 4190 size += int64(32) 4191 } 4192 // field Left vitess.io/vitess/go/vt/sqlparser.Expr 4193 if cc, ok := cached.Left.(cachedObject); ok { 4194 size += cc.CachedSize(true) 4195 } 4196 // field Right vitess.io/vitess/go/vt/sqlparser.Expr 4197 if cc, ok := cached.Right.(cachedObject); ok { 4198 size += cc.CachedSize(true) 4199 } 4200 return size 4201 }