Remove PARALLEL option from SQL commands

This commit is contained in:
Tobie Morgan Hitchcock 2020-03-06 15:44:53 +00:00
parent 480f4b00a9
commit 2ef562de06
11 changed files with 1599 additions and 2034 deletions

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -160,77 +160,70 @@ type IfelseStatement struct {
// SelectStatement represents a SQL SELECT statement.
type SelectStatement struct {
RW bool
Expr Fields
What Exprs
Cond Expr
Split Idents
Group Groups
Order Orders
Limit Expr
Start Expr
Fetch Fetchs
Version Expr
Timeout time.Duration
Parallel bool
RW bool
Expr Fields
What Exprs
Cond Expr
Split Idents
Group Groups
Order Orders
Limit Expr
Start Expr
Fetch Fetchs
Version Expr
Timeout time.Duration
}
// CreateStatement represents a SQL CREATE statement.
type CreateStatement struct {
What Exprs
Data Expr
Echo Token
Timeout time.Duration
Parallel bool
What Exprs
Data Expr
Echo Token
Timeout time.Duration
}
// UpdateStatement represents a SQL UPDATE statement.
type UpdateStatement struct {
What Exprs
Data Expr
Cond Expr
Echo Token
Timeout time.Duration
Parallel bool
What Exprs
Data Expr
Cond Expr
Echo Token
Timeout time.Duration
}
// DeleteStatement represents a SQL DELETE statement.
type DeleteStatement struct {
What Exprs
Cond Expr
Echo Token
Timeout time.Duration
Parallel bool
What Exprs
Cond Expr
Echo Token
Timeout time.Duration
}
// RelateStatement represents a SQL RELATE statement.
type RelateStatement struct {
Type Expr
From Exprs
With Exprs
Data Expr
Uniq bool
Echo Token
Timeout time.Duration
Parallel bool
Type Expr
From Exprs
With Exprs
Data Expr
Uniq bool
Echo Token
Timeout time.Duration
}
// InsertStatement represents a SQL INSERT statement.
type InsertStatement struct {
Data Expr
Into *Table
Echo Token
Timeout time.Duration
Parallel bool
Data Expr
Into *Table
Echo Token
Timeout time.Duration
}
// UpsertStatement represents a SQL UPSERT statement.
type UpsertStatement struct {
Data Expr
Into *Table
Echo Token
Timeout time.Duration
Parallel bool
Data Expr
Into *Table
Echo Token
Timeout time.Duration
}
// --------------------------------------------------

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

File diff suppressed because it is too large Load diff

View file

@ -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
}

View file

@ -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
}