| 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.engine.SessionLocal; |
| 9 |
import org.h2.schema.Schema; |
| 10 |
|
| 11 |
/** |
| 12 |
* This class represents a non-transaction statement that involves a schema. |
| 13 |
*/ |
| 14 |
public abstract class SchemaCommand extends DefineCommand { |
| 15 |
|
| 16 |
private final Schema schema; |
| 17 |
|
| 18 |
/** |
| 19 |
* Create a new command. |
| 20 |
* |
| 21 |
* @param session the session |
| 22 |
* @param schema the schema |
| 23 |
*/ |
| 24 |
public SchemaCommand(SessionLocal session, Schema schema) { |
| 25 |
super(session); |
| 26 |
this.schema = schema; |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* Get the schema |
| 31 |
* |
| 32 |
* @return the schema |
| 33 |
*/ |
| 34 |
protected final Schema getSchema() { |
| 35 |
return schema; |
| 36 |
} |
| 37 |
|
| 38 |
} |