Remove SQL RECORD statement
This commit is contained in:
parent
73dd1c40ba
commit
dd79f3c440
6 changed files with 0 additions and 67 deletions
2
db/db.go
2
db/db.go
|
@ -155,8 +155,6 @@ func execute(ctx *fibre.Context, ast *sql.Query, chn chan<- interface{}) {
|
|||
res, err = executeDeleteStatement(txn, stm)
|
||||
case *sql.RelateStatement:
|
||||
res, err = executeRelateStatement(txn, stm)
|
||||
case *sql.RecordStatement:
|
||||
res, err = executeRecordStatement(txn, stm)
|
||||
|
||||
case *sql.DefineTableStatement:
|
||||
res, err = executeDefineTableStatement(txn, stm)
|
||||
|
|
24
db/record.go
24
db/record.go
|
@ -1,24 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"github.com/abcum/surreal/kvs"
|
||||
"github.com/abcum/surreal/sql"
|
||||
)
|
||||
|
||||
func executeRecordStatement(txn kvs.TX, ast *sql.RecordStatement) ([]interface{}, error) {
|
||||
return nil, nil
|
||||
}
|
11
sql/ast.go
11
sql/ast.go
|
@ -145,17 +145,6 @@ type RelateStatement struct {
|
|||
Echo Token `cork:"echo" codec:"echo"`
|
||||
}
|
||||
|
||||
// RecordStatement represents a SQL RECORD statement.
|
||||
type RecordStatement struct {
|
||||
KV string `cork:"-" codec:"-"`
|
||||
NS string `cork:"-" codec:"-"`
|
||||
DB string `cork:"-" codec:"-"`
|
||||
Type []Expr `cork:"type" codec:"type"`
|
||||
When Expr `cork:"when" codec:"when"`
|
||||
Data []Expr `cork:"data" codec:"data"`
|
||||
Echo Token `cork:"echo" codec:"echo"`
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
// Table
|
||||
// --------------------------------------------------
|
||||
|
|
|
@ -144,8 +144,6 @@ func (p *parser) parseSingle() (Statement, error) {
|
|||
return p.parseDeleteStatement()
|
||||
case RELATE:
|
||||
return p.parseRelateStatement()
|
||||
case RECORD:
|
||||
return p.parseRecordStatement()
|
||||
|
||||
case DEFINE:
|
||||
return p.parseDefineStatement()
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package sql
|
||||
|
||||
func (p *parser) parseRecordStatement() (stmt *RecordStatement, err error) {
|
||||
|
||||
stmt = &RecordStatement{}
|
||||
|
||||
stmt.KV = p.c.Get("KV").(string)
|
||||
stmt.NS = p.c.Get("NS").(string)
|
||||
stmt.DB = p.c.Get("DB").(string)
|
||||
|
||||
return
|
||||
|
||||
}
|
|
@ -41,7 +41,6 @@ func init() {
|
|||
gob.Register(sql.ModifyStatement{})
|
||||
gob.Register(sql.DeleteStatement{})
|
||||
gob.Register(sql.RelateStatement{})
|
||||
gob.Register(sql.RecordStatement{})
|
||||
gob.Register(sql.DefineViewStatement{})
|
||||
gob.Register(sql.DefineTableStatement{})
|
||||
gob.Register(sql.DefineRulesStatement{})
|
||||
|
|
Loading…
Reference in a new issue