Remove POLICY from SQL DEFINE SCOPE statement

This commit is contained in:
Tobie Morgan Hitchcock 2016-11-21 18:43:15 +00:00
parent 11d394f9fc
commit 19650ab770
4 changed files with 8 additions and 19 deletions

View file

@ -263,7 +263,6 @@ type DefineScopeStatement struct {
Time time.Duration `cork:"time" codec:"time"`
Signup Expr `cork:"signup" codec:"signup"`
Signin Expr `cork:"signin" codec:"signin"`
Policy map[string]interface{} `cork:"policy" codec:"policy"`
}
// RemoveScopeStatement represents an SQL REMOVE SCOPE statement.

View file

@ -1201,7 +1201,6 @@ func (this *DefineScopeStatement) MarshalCORK() (dst []byte, err error) {
e.Encode(this.Time)
e.Encode(this.Signup)
e.Encode(this.Signin)
e.Encode(this.Policy)
return b.Bytes(), nil
}
@ -1212,7 +1211,6 @@ func (this *DefineScopeStatement) UnmarshalCORK(src []byte) (err error) {
d.Decode(&this.Time)
d.Decode(&this.Signup)
d.Decode(&this.Signin)
d.Decode(&this.Policy)
return
}

View file

@ -28,7 +28,7 @@ func (p *parser) parseDefineScopeStatement() (stmt *DefineScopeStatement, err er
for {
tok, _, exi := p.mightBe(SESSION, POLICY, SIGNUP, SIGNIN)
tok, _, exi := p.mightBe(SESSION, SIGNUP, SIGNIN)
if !exi {
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) {
_, _, _ = p.mightBe(AS)
if stmt.Signup, err = p.parseExpr(); err != nil {

View file

@ -157,7 +157,6 @@ const (
OR
ORDER
PASSWORD
POLICY
READONLY
REJECT
RELATE
@ -321,7 +320,6 @@ var tokens = [...]string{
OR: "OR",
ORDER: "ORDER",
PASSWORD: "PASSWORD",
POLICY: "POLICY",
READONLY: "READONLY",
REJECT: "REJECT",
RELATE: "RELATE",