Remove PARALLEL option from SQL commands
This commit is contained in:
parent
480f4b00a9
commit
2ef562de06
11 changed files with 1599 additions and 2034 deletions
94
db/db.gen.go
94
db/db.gen.go
|
@ -11,23 +11,23 @@ import (
|
|||
|
||||
const (
|
||||
// ----- content types ----
|
||||
codecSelferCcUTF88981 = 1
|
||||
codecSelferCcRAW8981 = 255
|
||||
codecSelferCcUTF88297 = 1
|
||||
codecSelferCcRAW8297 = 255
|
||||
// ----- value types used ----
|
||||
codecSelferValueTypeArray8981 = 10
|
||||
codecSelferValueTypeMap8981 = 9
|
||||
codecSelferValueTypeString8981 = 6
|
||||
codecSelferValueTypeInt8981 = 2
|
||||
codecSelferValueTypeUint8981 = 3
|
||||
codecSelferValueTypeFloat8981 = 4
|
||||
codecSelferBitsize8981 = uint8(32 << (^uint(0) >> 63))
|
||||
codecSelferValueTypeArray8297 = 10
|
||||
codecSelferValueTypeMap8297 = 9
|
||||
codecSelferValueTypeString8297 = 6
|
||||
codecSelferValueTypeInt8297 = 2
|
||||
codecSelferValueTypeUint8297 = 3
|
||||
codecSelferValueTypeFloat8297 = 4
|
||||
codecSelferBitsize8297 = uint8(32 << (^uint(0) >> 63))
|
||||
)
|
||||
|
||||
var (
|
||||
errCodecSelferOnlyMapOrArrayEncodeToStruct8981 = errors.New(`only encoded map or array can be decoded into a struct`)
|
||||
errCodecSelferOnlyMapOrArrayEncodeToStruct8297 = errors.New(`only encoded map or array can be decoded into a struct`)
|
||||
)
|
||||
|
||||
type codecSelfer8981 struct{}
|
||||
type codecSelfer8297 struct{}
|
||||
|
||||
func init() {
|
||||
if codec1978.GenVersion != 10 {
|
||||
|
@ -40,7 +40,7 @@ func init() {
|
|||
}
|
||||
|
||||
func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer8981
|
||||
var h codecSelfer8297
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
if x == nil {
|
||||
|
@ -78,10 +78,10 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if yyq2[0] {
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Time))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Time))
|
||||
}
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, "")
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, "")
|
||||
}
|
||||
} else {
|
||||
if yyq2[0] {
|
||||
|
@ -89,12 +89,12 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if z.IsJSONHandle() {
|
||||
z.WriteStr("\"time\"")
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, `time`)
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, `time`)
|
||||
}
|
||||
r.WriteMapElemValue()
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Time))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Time))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,10 +103,10 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if yyq2[1] {
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Status))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Status))
|
||||
}
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, "")
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, "")
|
||||
}
|
||||
} else {
|
||||
if yyq2[1] {
|
||||
|
@ -114,12 +114,12 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if z.IsJSONHandle() {
|
||||
z.WriteStr("\"status\"")
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, `status`)
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, `status`)
|
||||
}
|
||||
r.WriteMapElemValue()
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Status))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Status))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,10 +128,10 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if yyq2[2] {
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Detail))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Detail))
|
||||
}
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, "")
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, "")
|
||||
}
|
||||
} else {
|
||||
if yyq2[2] {
|
||||
|
@ -139,12 +139,12 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if z.IsJSONHandle() {
|
||||
z.WriteStr("\"detail\"")
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, `detail`)
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, `detail`)
|
||||
}
|
||||
r.WriteMapElemValue()
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Detail))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Detail))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if z.IsJSONHandle() {
|
||||
z.WriteStr("\"result\"")
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, `result`)
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, `result`)
|
||||
}
|
||||
r.WriteMapElemValue()
|
||||
if x.Result == nil {
|
||||
|
@ -191,7 +191,7 @@ func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
}
|
||||
|
||||
func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer8981
|
||||
var h codecSelfer8297
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
if false {
|
||||
|
@ -199,14 +199,14 @@ func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) {
|
|||
z.DecExtension(x, yyxt1)
|
||||
} else {
|
||||
yyct2 := r.ContainerType()
|
||||
if yyct2 == codecSelferValueTypeMap8981 {
|
||||
if yyct2 == codecSelferValueTypeMap8297 {
|
||||
yyl2 := r.ReadMapStart()
|
||||
if yyl2 == 0 {
|
||||
r.ReadMapEnd()
|
||||
} else {
|
||||
x.codecDecodeSelfFromMap(yyl2, d)
|
||||
}
|
||||
} else if yyct2 == codecSelferValueTypeArray8981 {
|
||||
} else if yyct2 == codecSelferValueTypeArray8297 {
|
||||
yyl2 := r.ReadArrayStart()
|
||||
if yyl2 == 0 {
|
||||
r.ReadArrayEnd()
|
||||
|
@ -214,13 +214,13 @@ func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) {
|
|||
x.codecDecodeSelfFromArray(yyl2, d)
|
||||
}
|
||||
} else {
|
||||
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct8981)
|
||||
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct8297)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer8981
|
||||
var h codecSelfer8297
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
var yyhl3 bool = l >= 0
|
||||
|
@ -273,7 +273,7 @@ func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
|||
}
|
||||
|
||||
func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer8981
|
||||
var h codecSelfer8297
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
var yyj9 int
|
||||
|
@ -363,7 +363,7 @@ func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
|||
}
|
||||
|
||||
func (x *Dispatch) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer8981
|
||||
var h codecSelfer8297
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
if x == nil {
|
||||
|
@ -400,10 +400,10 @@ func (x *Dispatch) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if yyq2[0] {
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Query))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Query))
|
||||
}
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, "")
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, "")
|
||||
}
|
||||
} else {
|
||||
if yyq2[0] {
|
||||
|
@ -411,12 +411,12 @@ func (x *Dispatch) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if z.IsJSONHandle() {
|
||||
z.WriteStr("\"query\"")
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, `query`)
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, `query`)
|
||||
}
|
||||
r.WriteMapElemValue()
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Query))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Query))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -425,10 +425,10 @@ func (x *Dispatch) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if yyq2[1] {
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Action))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Action))
|
||||
}
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, "")
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, "")
|
||||
}
|
||||
} else {
|
||||
if yyq2[1] {
|
||||
|
@ -436,12 +436,12 @@ func (x *Dispatch) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if z.IsJSONHandle() {
|
||||
z.WriteStr("\"action\"")
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, `action`)
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, `action`)
|
||||
}
|
||||
r.WriteMapElemValue()
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, string(x.Action))
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, string(x.Action))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ func (x *Dispatch) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
if z.IsJSONHandle() {
|
||||
z.WriteStr("\"result\"")
|
||||
} else {
|
||||
r.EncodeStringEnc(codecSelferCcUTF88981, `result`)
|
||||
r.EncodeStringEnc(codecSelferCcUTF88297, `result`)
|
||||
}
|
||||
r.WriteMapElemValue()
|
||||
if x.Result == nil {
|
||||
|
@ -488,7 +488,7 @@ func (x *Dispatch) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
}
|
||||
|
||||
func (x *Dispatch) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer8981
|
||||
var h codecSelfer8297
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
if false {
|
||||
|
@ -496,14 +496,14 @@ func (x *Dispatch) CodecDecodeSelf(d *codec1978.Decoder) {
|
|||
z.DecExtension(x, yyxt1)
|
||||
} else {
|
||||
yyct2 := r.ContainerType()
|
||||
if yyct2 == codecSelferValueTypeMap8981 {
|
||||
if yyct2 == codecSelferValueTypeMap8297 {
|
||||
yyl2 := r.ReadMapStart()
|
||||
if yyl2 == 0 {
|
||||
r.ReadMapEnd()
|
||||
} else {
|
||||
x.codecDecodeSelfFromMap(yyl2, d)
|
||||
}
|
||||
} else if yyct2 == codecSelferValueTypeArray8981 {
|
||||
} else if yyct2 == codecSelferValueTypeArray8297 {
|
||||
yyl2 := r.ReadArrayStart()
|
||||
if yyl2 == 0 {
|
||||
r.ReadArrayEnd()
|
||||
|
@ -511,13 +511,13 @@ func (x *Dispatch) CodecDecodeSelf(d *codec1978.Decoder) {
|
|||
x.codecDecodeSelfFromArray(yyl2, d)
|
||||
}
|
||||
} else {
|
||||
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct8981)
|
||||
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct8297)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Dispatch) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer8981
|
||||
var h codecSelfer8297
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
var yyhl3 bool = l >= 0
|
||||
|
@ -564,7 +564,7 @@ func (x *Dispatch) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
|||
}
|
||||
|
||||
func (x *Dispatch) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer8981
|
||||
var h codecSelfer8297
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
var yyj8 int
|
||||
|
|
2659
sql/ast.gen.go
2659
sql/ast.gen.go
File diff suppressed because it is too large
Load diff
|
@ -172,7 +172,6 @@ type SelectStatement struct {
|
|||
Fetch Fetchs
|
||||
Version Expr
|
||||
Timeout time.Duration
|
||||
Parallel bool
|
||||
}
|
||||
|
||||
// CreateStatement represents a SQL CREATE statement.
|
||||
|
@ -181,7 +180,6 @@ type CreateStatement struct {
|
|||
Data Expr
|
||||
Echo Token
|
||||
Timeout time.Duration
|
||||
Parallel bool
|
||||
}
|
||||
|
||||
// UpdateStatement represents a SQL UPDATE statement.
|
||||
|
@ -191,7 +189,6 @@ type UpdateStatement struct {
|
|||
Cond Expr
|
||||
Echo Token
|
||||
Timeout time.Duration
|
||||
Parallel bool
|
||||
}
|
||||
|
||||
// DeleteStatement represents a SQL DELETE statement.
|
||||
|
@ -200,7 +197,6 @@ type DeleteStatement struct {
|
|||
Cond Expr
|
||||
Echo Token
|
||||
Timeout time.Duration
|
||||
Parallel bool
|
||||
}
|
||||
|
||||
// RelateStatement represents a SQL RELATE statement.
|
||||
|
@ -212,7 +208,6 @@ type RelateStatement struct {
|
|||
Uniq bool
|
||||
Echo Token
|
||||
Timeout time.Duration
|
||||
Parallel bool
|
||||
}
|
||||
|
||||
// InsertStatement represents a SQL INSERT statement.
|
||||
|
@ -221,7 +216,6 @@ type InsertStatement struct {
|
|||
Into *Table
|
||||
Echo Token
|
||||
Timeout time.Duration
|
||||
Parallel bool
|
||||
}
|
||||
|
||||
// UpsertStatement represents a SQL UPSERT statement.
|
||||
|
@ -230,7 +224,6 @@ type UpsertStatement struct {
|
|||
Into *Table
|
||||
Echo Token
|
||||
Timeout time.Duration
|
||||
Parallel bool
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
|
|
|
@ -34,10 +34,6 @@ func (p *parser) parseCreateStatement() (stmt *CreateStatement, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if stmt.Parallel, err = p.parseParallel(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
|
|
@ -36,10 +36,6 @@ func (p *parser) parseDeleteStatement() (stmt *DeleteStatement, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if stmt.Parallel, err = p.parseParallel(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
|
|
@ -40,10 +40,6 @@ func (p *parser) parseInsertStatement() (stmt *InsertStatement, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if stmt.Parallel, err = p.parseParallel(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
|
|
@ -78,10 +78,6 @@ func (p *parser) parseRelateStatement() (stmt *RelateStatement, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if stmt.Parallel, err = p.parseParallel(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
|
|
@ -75,10 +75,6 @@ func (p *parser) parseSelectStatement() (stmt *SelectStatement, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if stmt.Parallel, err = p.parseParallel(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err = checkExpression(aggrs, stmt.Expr, stmt.Group); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
113
sql/sql_test.go
113
sql/sql_test.go
|
@ -457,7 +457,6 @@ func Test_Parse_Queries_Let(t *testing.T) {
|
|||
What: &SubExpression{Expr: &CreateStatement{
|
||||
What: Exprs{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}},
|
||||
}}},
|
||||
},
|
||||
|
@ -568,7 +567,6 @@ func Test_Parse_Queries_Return(t *testing.T) {
|
|||
What: Exprs{&SubExpression{Expr: &CreateStatement{
|
||||
What: Exprs{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
}}},
|
||||
},
|
||||
|
@ -616,7 +614,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -641,7 +638,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{float64(111)},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -651,7 +647,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"111"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -660,7 +655,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"2006-01-02"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -669,7 +663,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"2006-01-02T15:04:05+07:00"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -678,7 +671,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"2006-01-02T15:04:05.999999999+07:00"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -687,7 +679,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -696,7 +687,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}, &Ident{"tweet"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -705,7 +695,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: "1a"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -715,7 +704,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: "1a"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -724,7 +712,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: float64(123456)}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -734,7 +721,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: float64(123456)}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -743,7 +729,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: float64(123.456)}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -753,7 +738,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: float64(123.456)}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -762,7 +746,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: "123.456.789.012"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -772,7 +755,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: "123.456.789.012"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -782,7 +764,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: date}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -791,7 +772,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: nano}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -800,7 +780,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: "A250C5A3-948F-4657-88AD-FF5F27B5B24E"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -809,7 +788,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: "8250C5A3-948F-4657-88AD-FF5F27B5B24E"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -818,7 +796,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "person", ID: "Tobie Morgan Hitchcock"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -827,7 +804,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "email addresses", ID: "tobie@abcum.com"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -836,7 +812,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Thing{TB: "email addresses", ID: "tobie+spam@abcum.com"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -848,7 +823,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
{Expr: &Ident{"temp"}, Field: "test", Alias: "test"},
|
||||
},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -859,7 +833,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
{Expr: &Ident{"email addresses"}, Field: "emails", Alias: "emails"},
|
||||
},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -870,7 +843,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
{Expr: &Ident{"emails"}, Field: "email addresses", Alias: "email addresses"},
|
||||
},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -883,9 +855,7 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
What: Exprs{&SubExpression{Expr: &CreateStatement{
|
||||
What: Exprs{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -895,7 +865,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"id"}, Op: EQ, RHS: &Value{"\n"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -905,7 +874,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"id"}, Op: EQ, RHS: &Value{"\r"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -915,7 +883,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"id"}, Op: EQ, RHS: &Value{"\b\n\r\t"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -929,7 +896,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &Ident{"id"},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -943,7 +909,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"id"}, Op: EQ, RHS: float64(1)},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -953,7 +918,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: EQ, RHS: &Empty{}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -963,7 +927,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: NEQ, RHS: &Empty{}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -974,7 +937,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: EQ, RHS: &Void{}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -985,7 +947,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: NEQ, RHS: &Void{}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -996,7 +957,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: EQ, RHS: &Empty{}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1007,7 +967,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: NEQ, RHS: &Empty{}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1018,7 +977,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: EQ, RHS: &Void{}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1029,7 +987,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: NEQ, RHS: &Void{}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1039,7 +996,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: EQ, RHS: true},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1049,7 +1005,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"old"}, Op: EQ, RHS: false},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1095,7 +1050,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1117,7 +1071,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Op: EQ,
|
||||
RHS: float64(10),
|
||||
},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1139,7 +1092,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Op: EQ,
|
||||
RHS: float64(14),
|
||||
},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1165,7 +1117,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Op: EQ,
|
||||
RHS: float64(18),
|
||||
},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1191,7 +1142,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Op: EQ,
|
||||
RHS: float64(17),
|
||||
},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1219,7 +1169,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Op: EQ,
|
||||
RHS: float64(32),
|
||||
},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1230,7 +1179,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"test"}, Op: INS, RHS: []interface{}{"London", "Paris"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1241,7 +1189,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"test"}, Op: INS, RHS: []interface{}{"London", "Paris"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1252,7 +1199,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"test"}, Op: NIS, RHS: []interface{}{"London", "Paris"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1263,7 +1209,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: []interface{}{"London", "Paris"}, Op: SIN, RHS: &Ident{"test"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1274,7 +1219,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: []interface{}{"London", "Paris"}, Op: SNI, RHS: &Ident{"test"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1288,7 +1232,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"test"}, Op: EQ, RHS: map[string]interface{}{"name": "London"}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1298,7 +1241,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Cond: &BinaryExpression{LHS: &Ident{"test"}, Op: EQ, RHS: map[string]interface{}{"name": map[string]interface{}{"f": "first", "l": "last"}}},
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1308,7 +1250,6 @@ func Test_Parse_Queries_Select(t *testing.T) {
|
|||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Timeout: 1 * time.Second,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1378,7 +1319,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&CreateStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1395,7 +1335,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &DataExpression{Data: []*ItemExpression{{LHS: &Ident{"firstname"}, Op: EQ, RHS: &Void{}}}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1404,7 +1343,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &DataExpression{Data: []*ItemExpression{{LHS: &Ident{"firstname"}, Op: EQ, RHS: &Empty{}}}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1417,7 +1355,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &DataExpression{Data: []*ItemExpression{{LHS: &Ident{"firstname"}, Op: EQ, RHS: &Value{"Tobie"}}}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1438,7 +1375,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &MergeExpression{Data: map[string]interface{}{"firstname": "Tobie"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1459,7 +1395,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &ContentExpression{Data: map[string]interface{}{"firstname": "Tobie"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1471,7 +1406,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&CreateStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: NONE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1479,7 +1413,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&CreateStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: BEFORE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1488,7 +1421,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&CreateStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1497,7 +1429,6 @@ func Test_Parse_Queries_Create(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Timeout: 1 * time.Second,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1528,7 +1459,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&UpdateStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1545,7 +1475,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &DataExpression{Data: []*ItemExpression{{LHS: &Ident{"firstname"}, Op: EQ, RHS: &Void{}}}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1554,7 +1483,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &DataExpression{Data: []*ItemExpression{{LHS: &Ident{"firstname"}, Op: EQ, RHS: &Empty{}}}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1567,7 +1495,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &DataExpression{Data: []*ItemExpression{{LHS: &Ident{"firstname"}, Op: EQ, RHS: &Value{"Tobie"}}}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1588,7 +1515,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &DiffExpression{Data: []interface{}{}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1609,7 +1535,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &MergeExpression{Data: map[string]interface{}{"firstname": "Tobie"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1630,7 +1555,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Data: &ContentExpression{Data: map[string]interface{}{"firstname": "Tobie"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1642,7 +1566,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&UpdateStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: NONE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1650,7 +1573,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&UpdateStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: BEFORE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1659,7 +1581,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&UpdateStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1668,7 +1589,6 @@ func Test_Parse_Queries_Update(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Timeout: 1 * time.Second,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1703,7 +1623,6 @@ func Test_Parse_Queries_Delete(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&DeleteStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: NONE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1716,7 +1635,6 @@ func Test_Parse_Queries_Delete(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&DeleteStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: NONE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1724,7 +1642,6 @@ func Test_Parse_Queries_Delete(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&DeleteStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: BEFORE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1732,7 +1649,6 @@ func Test_Parse_Queries_Delete(t *testing.T) {
|
|||
res: &Query{Statements: []Statement{&DeleteStatement{
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1741,7 +1657,6 @@ func Test_Parse_Queries_Delete(t *testing.T) {
|
|||
What: []Expr{&Ident{"person"}},
|
||||
Echo: NONE,
|
||||
Timeout: 1 * time.Second,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1798,7 +1713,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
From: []Expr{&Ident{"person"}},
|
||||
With: []Expr{&Ident{"item"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1809,7 +1723,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
From: []Expr{&Ident{"person"}},
|
||||
With: []Expr{&Ident{"item"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1820,7 +1733,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
With: []Expr{&Ident{"item"}},
|
||||
Uniq: true,
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1832,7 +1744,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
With: []Expr{&Ident{"item"}},
|
||||
Uniq: true,
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1851,7 +1762,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
With: []Expr{&Ident{"item"}},
|
||||
Data: &DataExpression{Data: []*ItemExpression{{LHS: &Ident{"public"}, Op: EQ, RHS: true}}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1865,7 +1775,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
From: []Expr{&Ident{"person"}},
|
||||
With: []Expr{&Ident{"item"}},
|
||||
Echo: NONE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1875,7 +1784,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
From: []Expr{&Ident{"person"}},
|
||||
With: []Expr{&Ident{"item"}},
|
||||
Echo: BEFORE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1886,7 +1794,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
From: []Expr{&Ident{"person"}},
|
||||
With: []Expr{&Ident{"item"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1897,7 +1804,6 @@ func Test_Parse_Queries_Relate(t *testing.T) {
|
|||
With: []Expr{&Ident{"item"}},
|
||||
Echo: AFTER,
|
||||
Timeout: 1 * time.Second,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1937,7 +1843,6 @@ func Test_Parse_Queries_Insert(t *testing.T) {
|
|||
Data: []interface{}{"one", "two", "tre"},
|
||||
Into: &Table{"person"},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1950,7 +1855,6 @@ func Test_Parse_Queries_Insert(t *testing.T) {
|
|||
Data: []interface{}{"one", "two", "tre"},
|
||||
Into: &Table{"person"},
|
||||
Echo: NONE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1959,7 +1863,6 @@ func Test_Parse_Queries_Insert(t *testing.T) {
|
|||
Data: []interface{}{"one", "two", "tre"},
|
||||
Into: &Table{"person"},
|
||||
Echo: BEFORE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1969,7 +1872,6 @@ func Test_Parse_Queries_Insert(t *testing.T) {
|
|||
Data: []interface{}{"one", "two", "tre"},
|
||||
Into: &Table{"person"},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -1979,7 +1881,6 @@ func Test_Parse_Queries_Insert(t *testing.T) {
|
|||
Into: &Table{"person"},
|
||||
Echo: AFTER,
|
||||
Timeout: 1 * time.Second,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -2019,7 +1920,6 @@ func Test_Parse_Queries_Upsert(t *testing.T) {
|
|||
Data: []interface{}{"one", "two", "tre"},
|
||||
Into: &Table{"person"},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -2032,7 +1932,6 @@ func Test_Parse_Queries_Upsert(t *testing.T) {
|
|||
Data: []interface{}{"one", "two", "tre"},
|
||||
Into: &Table{"person"},
|
||||
Echo: NONE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -2041,7 +1940,6 @@ func Test_Parse_Queries_Upsert(t *testing.T) {
|
|||
Data: []interface{}{"one", "two", "tre"},
|
||||
Into: &Table{"person"},
|
||||
Echo: BEFORE,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -2051,7 +1949,6 @@ func Test_Parse_Queries_Upsert(t *testing.T) {
|
|||
Data: []interface{}{"one", "two", "tre"},
|
||||
Into: &Table{"person"},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -2061,7 +1958,6 @@ func Test_Parse_Queries_Upsert(t *testing.T) {
|
|||
Into: &Table{"person"},
|
||||
Echo: AFTER,
|
||||
Timeout: 1 * time.Second,
|
||||
Parallel: true,
|
||||
}}},
|
||||
},
|
||||
{
|
||||
|
@ -2418,7 +2314,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
Expr: &CreateStatement{
|
||||
What: Exprs{&Ident{"person"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
},
|
||||
},
|
||||
}}},
|
||||
|
@ -2435,7 +2330,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
Expr: &SelectStatement{
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"person"}},
|
||||
Parallel: true,
|
||||
},
|
||||
},
|
||||
}}},
|
||||
|
@ -2453,7 +2347,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Param{"id"}},
|
||||
Parallel: true,
|
||||
},
|
||||
},
|
||||
}}},
|
||||
|
@ -2466,7 +2359,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
Expr: &CreateStatement{
|
||||
What: []Expr{&Ident{"tester"}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
},
|
||||
},
|
||||
Signin: &SubExpression{
|
||||
|
@ -2474,7 +2366,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Ident{"tester"}},
|
||||
Parallel: true,
|
||||
},
|
||||
},
|
||||
Connect: &SubExpression{
|
||||
|
@ -2482,7 +2373,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
RW: false,
|
||||
Expr: []*Field{{Expr: &All{}, Field: "*"}},
|
||||
What: []Expr{&Param{"id"}},
|
||||
Parallel: true,
|
||||
},
|
||||
},
|
||||
}}},
|
||||
|
@ -2707,7 +2597,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
},
|
||||
}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -2735,7 +2624,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
},
|
||||
}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
},
|
||||
&UpdateStatement{
|
||||
What: Exprs{&Param{"this"}},
|
||||
|
@ -2747,7 +2635,6 @@ func Test_Parse_Queries_Define(t *testing.T) {
|
|||
},
|
||||
}},
|
||||
Echo: AFTER,
|
||||
Parallel: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -38,10 +38,6 @@ func (p *parser) parseUpdateStatement() (stmt *UpdateStatement, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if stmt.Parallel, err = p.parseParallel(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
|
|
@ -40,10 +40,6 @@ func (p *parser) parseUpsertStatement() (stmt *UpsertStatement, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if stmt.Parallel, err = p.parseParallel(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue