public enum EOBTenantMode extends Enum<EOBTenantMode>
OceanBase is a multi-tenant database whose SQL surface depends on the
tenant kind. Each TGSqlParser instance configured for
EDbVendor.dbvoceanbase carries one of these modes:
MYSQL — User tenant in MySQL compatibility mode. SQL surface
is MySQL 5.7 / 8.0 plus OceanBase extensions. Uses backtick-quoted
identifiers and ; as the statement terminator.ORACLE — User tenant in Oracle compatibility mode. SQL surface
is Oracle SQL plus PL/SQL plus OceanBase extensions. Uses double-quoted
identifiers, / as the PL/SQL block delimiter, and supports
packages, anonymous blocks, and PL/SQL routines.SYSTEM — System (sys) tenant. Lexically MySQL-family
(backticks, ;, no PL/SQL) but additionally accepts
OceanBase administrative DDL such as CREATE TENANT,
ALTER SYSTEM, CREATE RESOURCE POOL,
CREATE RESOURCE UNIT, and zone/server management commands.Tenant mode is permanent for the life of an OceanBase tenant on the
server side; this enum mirrors that immutability at the parser level.
One mode per TGSqlParser instance — do not switch modes mid-script.
Set the mode via TGSqlParser.setOBTenantMode(EOBTenantMode).
The default for a freshly constructed parser configured for
dbvoceanbase is MYSQL.
| Enum Constant and Description |
|---|
MYSQL
User tenant — MySQL compatibility mode (default).
|
ORACLE
User tenant — Oracle compatibility mode (full PL/SQL).
|
SYSTEM
System (
sys) tenant — MySQL syntax + OceanBase administrative DDL. |
| Modifier and Type | Method and Description |
|---|---|
static EOBTenantMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EOBTenantMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EOBTenantMode MYSQL
public static final EOBTenantMode ORACLE
public static final EOBTenantMode SYSTEM
sys) tenant — MySQL syntax + OceanBase administrative DDL.public static EOBTenantMode[] values()
for (EOBTenantMode c : EOBTenantMode.values()) System.out.println(c);
public static EOBTenantMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null