-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: parse and recognize
ALTER SCHEMA
and DROP SCHEMA
Touches #50880. Touches #50884. This commit adds the boilerplate for adding the `ALTER SCHEMA` and `DROP SCHEMA` statements. Release note: None
- Loading branch information
Showing
13 changed files
with
272 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2020 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package sql | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/cockroachdb/cockroach/pkg/sql/sem/tree" | ||
"github.com/cockroachdb/cockroach/pkg/util/errorutil/unimplemented" | ||
"github.com/cockroachdb/errors" | ||
) | ||
|
||
type alterSchemaNode struct { | ||
n *tree.AlterSchema | ||
} | ||
|
||
// Use to satisfy the linter. | ||
var _ planNode = &alterSchemaNode{n: nil} | ||
|
||
func (p *planner) AlterSchema(ctx context.Context, n *tree.AlterSchema) (planNode, error) { | ||
return nil, unimplemented.NewWithIssue(50880, "ALTER SCHEMA") | ||
} | ||
|
||
func (n *alterSchemaNode) startExec(params runParams) error { | ||
return errors.AssertionFailedf("unimplemented") | ||
} | ||
|
||
func (n *alterSchemaNode) Next(params runParams) (bool, error) { return false, nil } | ||
func (n *alterSchemaNode) Values() tree.Datums { return tree.Datums{} } | ||
func (n *alterSchemaNode) Close(ctx context.Context) {} | ||
func (n *alterSchemaNode) ReadingOwnWrites() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2020 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package sql | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/cockroachdb/cockroach/pkg/sql/sem/tree" | ||
"github.com/cockroachdb/cockroach/pkg/util/errorutil/unimplemented" | ||
"github.com/cockroachdb/errors" | ||
) | ||
|
||
type dropSchemaNode struct { | ||
n *tree.DropSchema | ||
} | ||
|
||
// Use to satisfy the linter. | ||
var _ planNode = &dropSchemaNode{n: nil} | ||
|
||
func (p *planner) DropSchema(ctx context.Context, n *tree.DropSchema) (planNode, error) { | ||
return nil, unimplemented.NewWithIssue(50884, "DROP SCHEMA") | ||
} | ||
|
||
func (n *dropSchemaNode) startExec(params runParams) error { | ||
return errors.AssertionFailedf("unimplemented") | ||
} | ||
|
||
func (n *dropSchemaNode) Next(params runParams) (bool, error) { return false, nil } | ||
func (n *dropSchemaNode) Values() tree.Datums { return tree.Datums{} } | ||
func (n *dropSchemaNode) Close(ctx context.Context) {} | ||
func (n *dropSchemaNode) ReadingOwnWrites() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.