github.com/matrixorigin/matrixone@v1.2.0/pkg/sql/parsers/tree/task.go (about) 1 // Copyright 2021 -2023 Matrix Origin 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package tree 16 17 type PauseDaemonTask struct { 18 statementImpl 19 TaskID uint64 20 } 21 22 func (node *PauseDaemonTask) Format(ctx *FmtCtx) { 23 ctx.WriteString("pause daemon task") 24 ctx.WriteByte(' ') 25 ctx.WriteRune(rune(node.TaskID)) 26 } 27 28 func (node *PauseDaemonTask) GetStatementType() string { return "Pause Daemon Task" } 29 func (node *PauseDaemonTask) GetQueryType() string { return QueryTypeDML } 30 31 type CancelDaemonTask struct { 32 statementImpl 33 TaskID uint64 34 } 35 36 func (node *CancelDaemonTask) Format(ctx *FmtCtx) { 37 ctx.WriteString("cancel daemon task") 38 ctx.WriteByte(' ') 39 ctx.WriteRune(rune(node.TaskID)) 40 } 41 42 func (node *CancelDaemonTask) GetStatementType() string { return "Cancel Daemon Task" } 43 func (node *CancelDaemonTask) GetQueryType() string { return QueryTypeDML } 44 45 type ResumeDaemonTask struct { 46 statementImpl 47 TaskID uint64 48 } 49 50 func (node *ResumeDaemonTask) Format(ctx *FmtCtx) { 51 ctx.WriteString("resume daemon task") 52 ctx.WriteByte(' ') 53 ctx.WriteRune(rune(node.TaskID)) 54 } 55 56 func (node *ResumeDaemonTask) GetStatementType() string { return "Resume Daemon Task" } 57 func (node *ResumeDaemonTask) GetQueryType() string { return QueryTypeDML }