Remove SQL RECORD statement

This commit is contained in:
Tobie Morgan Hitchcock 2016-10-07 14:21:01 +01:00
parent 73dd1c40ba
commit dd79f3c440
6 changed files with 0 additions and 67 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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