Debian Codegraph @

src/main/org/h2/engine/CastDataProvider.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.engine;
7
8 import org.h2.api.JavaObjectSerializer;
9 import org.h2.util.TimeZoneProvider;
10 import org.h2.value.ValueTimestampTimeZone;
11
12 /**
13 * Provides information for type casts and comparison operations.
14 */
15 public interface CastDataProvider {
16
17 /**
18 * Returns the current timestamp with maximum resolution. The value must be
19 * the same within a transaction or within execution of a command.
20 *
21 * @return the current timestamp for CURRENT_TIMESTAMP(9)
22 */
23 ValueTimestampTimeZone currentTimestamp();
24
25 /**
26 * Returns the current time zone.
27 *
28 * @return the current time zone
29 */
30 TimeZoneProvider currentTimeZone();
31
32 /**
33 * Returns the database mode.
34 *
35 * @return the database mode
36 */
37 Mode getMode();
38
39 /**
40 * Returns the custom Java object serializer, or {@code null}.
41 *
42 * @return the custom Java object serializer, or {@code null}
43 */
44 JavaObjectSerializer getJavaObjectSerializer();
45
46 /**
47 * Returns are ENUM values 0-based.
48 *
49 * @return are ENUM values 0-based
50 */
51 boolean zeroBasedEnums();
52
53 }