Debian Codegraph @

src/main/org/h2/command/ddl/DefineCommand.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.ddl;
7
8 import org.h2.command.Prepared;
9 import org.h2.engine.SessionLocal;
10 import org.h2.result.ResultInterface;
11
12 /**
13 * This class represents a non-transaction statement, for example a CREATE or
14 * DROP.
15 */
16 public abstract class DefineCommand extends Prepared {
17
18 /**
19 * The transactional behavior. The default is disabled, meaning the command
20 * commits an open transaction.
21 */
22 protected boolean transactional;
23
24 /**
25 * Create a new command for the given session.
26 *
27 * @param session the session
28 */
29 DefineCommand(SessionLocal session) {
30 super(session);
31 }
32
33 @Override
34 public boolean isReadOnly() {
35 return false;
36 }
37
38 @Override
39 public ResultInterface queryMeta() {
40 return null;
41 }
42
43 public void setTransactional(boolean transactional) {
44 this.transactional = transactional;
45 }
46
47 @Override
48 public boolean isTransactional() {
49 return transactional;
50 }
51
52 @Override
53 public boolean isRetryable() {
54 return false;
55 }
56
57 }