01: /*
02: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
03: * (http://h2database.com/html/license.html).
04: * Initial Developer: H2 Group
05: */
06: package org.h2.command.dml;
07:
08: import org.h2.command.Prepared;
09: import org.h2.engine.Session;
10: import org.h2.result.LocalResult;
11:
12: /**
13: * Represents an empty statement or a statement that has no effect.
14: */
15: public class NoOperation extends Prepared {
16:
17: public NoOperation(Session session) {
18: super (session);
19: }
20:
21: public int update() {
22: return 0;
23: }
24:
25: public boolean isQuery() {
26: return false;
27: }
28:
29: public boolean isTransactional() {
30: return true;
31: }
32:
33: public boolean needRecompile() {
34: return false;
35: }
36:
37: public boolean isReadOnly() {
38: return true;
39: }
40:
41: public LocalResult queryMeta() {
42: return null;
43: }
44:
45: }
|