TestPrintPrettyStmtNode.golden 2.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
[]ast.StmtNode{
    &ast.SelectStmt{
        dmlNode: ast.dmlNode{
            stmtNode: ast.stmtNode{
                node: ast.node{text:"select 1"},
            },
        },
        resultSetNode:  ast.resultSetNode{},
        SelectStmtOpts: &ast.SelectStmtOpts{
            Distinct:      false,
            SQLCache:      true,
            CalcFoundRows: false,
            StraightJoin:  false,
            Priority:      0,
            TableHints:    nil,
        },
        Distinct: false,
        From:     (*ast.TableRefsClause)(nil),
        Where:    nil,
        Fields:   &ast.FieldList{
            node:   ast.node{},
            Fields: {
                &ast.SelectField{
                    node:     ast.node{text:"1"},
                    Offset:   7,
                    WildCard: (*ast.WildCardField)(nil),
                    Expr:     &driver.ValueExpr{
                        TexprNode: ast.exprNode{
                            node: ast.node{},
                            Type: types.FieldType{
                                Tp:      0x8,
                                Flag:    0x80,
                                Flen:    1,
                                Decimal: 0,
                                Charset: "binary",
                                Collate: "binary",
                                Elems:   nil,
                            },
                            flag: 0x0,
                        },
                        Datum: types.Datum{
                            k:         0x1,
                            collation: 0x0,
                            decimal:   0x0,
                            length:    0x0,
                            i:         1,
                            b:         nil,
                            x:         nil,
                        },
                        projectionOffset: -1,
                    },
                    AsName:    model.CIStr{},
                    Auxiliary: false,
                },
            },
        },
        GroupBy:              (*ast.GroupByClause)(nil),
        Having:               (*ast.HavingClause)(nil),
        WindowSpecs:          nil,
        OrderBy:              (*ast.OrderByClause)(nil),
        Limit:                (*ast.Limit)(nil),
        LockTp:               0,
        TableHints:           nil,
        IsAfterUnionDistinct: false,
        IsInBraces:           false,
    },
}