Debian Codegraph @

src/main/org/h2/command/dml/NoOperation.java

raw
1 /*
2 * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (https://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6 package org.h2.command.dml;
7
8 import org.h2.command.CommandInterface;
9 import org.h2.command.Prepared;
10 import org.h2.engine.SessionLocal;
11 import org.h2.result.ResultInterface;
12
13 /**
14 * Represents an empty statement or a statement that has no effect.
15 */
16 public class NoOperation extends Prepared {
17
18 public NoOperation(SessionLocal session) {
19 super(session);
20 }
21
22 @Override
23 public long update() {
24 return 0;
25 }
26
27 @Override
28 public boolean isTransactional() {
29 return true;
30 }
31
32 @Override
33 public boolean needRecompile() {
34 return false;
35 }
36
37 @Override
38 public boolean isReadOnly() {
39 return true;
40 }
41
42 @Override
43 public ResultInterface queryMeta() {
44 return null;
45 }
46
47 @Override
48 public int getType() {
49 return CommandInterface.NO_OPERATION;
50 }
51
52 }