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