Debian Codegraph @

src/main/org/h2/table/ColumnTemplate.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.table;
7
8 import org.h2.engine.SessionLocal;
9 import org.h2.expression.Expression;
10 import org.h2.schema.Domain;
11
12 /**
13 * Column or domain.
14 */
15 public interface ColumnTemplate {
16
17 Domain getDomain();
18
19 void setDomain(Domain domain);
20
21 /**
22 * Set the default expression.
23 *
24 * @param session
25 * the session
26 * @param defaultExpression
27 * the default expression
28 */
29 void setDefaultExpression(SessionLocal session, Expression defaultExpression);
30
31 Expression getDefaultExpression();
32
33 Expression getEffectiveDefaultExpression();
34
35 String getDefaultSQL();
36
37 /**
38 * Set the on update expression.
39 *
40 * @param session
41 * the session
42 * @param onUpdateExpression
43 * the on update expression
44 */
45 void setOnUpdateExpression(SessionLocal session, Expression onUpdateExpression);
46
47 Expression getOnUpdateExpression();
48
49 Expression getEffectiveOnUpdateExpression();
50
51 String getOnUpdateSQL();
52
53 /**
54 * Prepare all expressions of this column or domain.
55 *
56 * @param session
57 * the session
58 */
59 void prepareExpressions(SessionLocal session);
60
61 }