Remove POLICY from SQL DEFINE SCOPE statement
This commit is contained in:
parent
11d394f9fc
commit
19650ab770
4 changed files with 8 additions and 19 deletions
|
@ -263,7 +263,6 @@ type DefineScopeStatement struct {
|
||||||
Time time.Duration `cork:"time" codec:"time"`
|
Time time.Duration `cork:"time" codec:"time"`
|
||||||
Signup Expr `cork:"signup" codec:"signup"`
|
Signup Expr `cork:"signup" codec:"signup"`
|
||||||
Signin Expr `cork:"signin" codec:"signin"`
|
Signin Expr `cork:"signin" codec:"signin"`
|
||||||
Policy map[string]interface{} `cork:"policy" codec:"policy"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveScopeStatement represents an SQL REMOVE SCOPE statement.
|
// RemoveScopeStatement represents an SQL REMOVE SCOPE statement.
|
||||||
|
|
|
@ -1201,7 +1201,6 @@ func (this *DefineScopeStatement) MarshalCORK() (dst []byte, err error) {
|
||||||
e.Encode(this.Time)
|
e.Encode(this.Time)
|
||||||
e.Encode(this.Signup)
|
e.Encode(this.Signup)
|
||||||
e.Encode(this.Signin)
|
e.Encode(this.Signin)
|
||||||
e.Encode(this.Policy)
|
|
||||||
return b.Bytes(), nil
|
return b.Bytes(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1212,7 +1211,6 @@ func (this *DefineScopeStatement) UnmarshalCORK(src []byte) (err error) {
|
||||||
d.Decode(&this.Time)
|
d.Decode(&this.Time)
|
||||||
d.Decode(&this.Signup)
|
d.Decode(&this.Signup)
|
||||||
d.Decode(&this.Signin)
|
d.Decode(&this.Signin)
|
||||||
d.Decode(&this.Policy)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ func (p *parser) parseDefineScopeStatement() (stmt *DefineScopeStatement, err er
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
|
||||||
tok, _, exi := p.mightBe(SESSION, POLICY, SIGNUP, SIGNIN)
|
tok, _, exi := p.mightBe(SESSION, SIGNUP, SIGNIN)
|
||||||
if !exi {
|
if !exi {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -39,12 +39,6 @@ func (p *parser) parseDefineScopeStatement() (stmt *DefineScopeStatement, err er
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.is(tok, POLICY) {
|
|
||||||
if stmt.Policy, err = p.parseObject(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if p.is(tok, SIGNUP) {
|
if p.is(tok, SIGNUP) {
|
||||||
_, _, _ = p.mightBe(AS)
|
_, _, _ = p.mightBe(AS)
|
||||||
if stmt.Signup, err = p.parseExpr(); err != nil {
|
if stmt.Signup, err = p.parseExpr(); err != nil {
|
||||||
|
|
|
@ -157,7 +157,6 @@ const (
|
||||||
OR
|
OR
|
||||||
ORDER
|
ORDER
|
||||||
PASSWORD
|
PASSWORD
|
||||||
POLICY
|
|
||||||
READONLY
|
READONLY
|
||||||
REJECT
|
REJECT
|
||||||
RELATE
|
RELATE
|
||||||
|
@ -321,7 +320,6 @@ var tokens = [...]string{
|
||||||
OR: "OR",
|
OR: "OR",
|
||||||
ORDER: "ORDER",
|
ORDER: "ORDER",
|
||||||
PASSWORD: "PASSWORD",
|
PASSWORD: "PASSWORD",
|
||||||
POLICY: "POLICY",
|
|
||||||
READONLY: "READONLY",
|
READONLY: "READONLY",
|
||||||
REJECT: "REJECT",
|
REJECT: "REJECT",
|
||||||
RELATE: "RELATE",
|
RELATE: "RELATE",
|
||||||
|
|
Loading…
Reference in a new issue