On this page

TableEnv (Embedded)

TableEnv Type

For BangDB Embedded

Table environment defines the way a table should be created. This is a very important type and should be used carefully and in the right manner to create a table.

C++

Selected

Java

Selected

To create TableEnv object

TableEnv();
To get PersistType
PersistType getDbType();
To set PersistType
void setDbType(PersistType db_type);
PersistType is an enum with following values:
INMEM_ONLY
INMEM_PERSIST
PERSIST_ONLY
Please see more on this at bangdb common To get index type for the table
IndexType getIdxType();
To set index type for a table
void setIdxType(IndexType idx_type);
indexType is an enum with following values
HASH,
EXTHASH
BTREE,
HEAP
Please see more on this at bangdb common To get logType for a table
LogType getTableLogType();
To set LogType for a table
void setTableLogType(LogType table_log_type);
Logtype is an enum with following values
SHARED_LOG,
PRIVATE_LOG,
INVALID_LOG
Please see more on this at bangdb common To get the table type
TableType getTableType();
To set the table type
void setTableType(TableType table_type);
TableType is an enum with following values:
NORMAL_TABLE
WIDE_TABLE
INDEX_TABLE
PRIMITIVE_INT
PRIMITIVE_TABLE_LONG
PRIMITIVE_TABLE_STRING
LARGE_TABLE
Please see more on this at bangdb common To get the key type
KeyType getKeyType();
To set the key type for a table
 void setKeyType(KeyType key_type);
KeyType is an enum with following values:
NORMAL_KEY = 1
COMPOSITE_KEY = 3
NORMAL_KEY_LONG = 10
Please see more on this at bangdb common To the sorting method for a table
SortMethod getSortMethod();
To set sorting method for a table
void setSortMethod(SortMethod sort_method);
SortMethod is an enum with values:
LEXICOGRAPH = 1,
QUASI_LEXICOGRAPH = 2,
SORT_METHOD_INVALID = 100
Please see more on this at bangdb common To get the sorting direction set for a table
SortDirection getSortDirection();
To set the sprint direction for a table
    void setSortDirection(SortDirection sort_direction);
SortDirection is an enum with values
SORT_ASCENDING = 3,
SORT_DESCENDING = 4
To get table subtype
TableSubType getTblSubType();
To set table subtype
void setTblSubType(TableSubType tbl_sub_type);
TableSubType is an enum with values
BANGDB_SW_TABLE
BANGDB_TOPK_TABLE
NON_ANALYTICAL_TABLE
INDEXBTREE_TABLE
DUPLINDEX_TABLE_NOLOG
Please see more on this at bangdb common To get PrimitiveDataType for a table
    PrimitiveDataType getPrimDataType();
To set value for Primitive data type for a table
    void setPrimDataType(PrimitiveDataType prim_data_type);
PrimitiveDataType is an enum with values
PRIMITIVE_INT
PRIMITIVE_LONG
PRIMITIVE_STRING,
PRIMITIVE_INVALID
Please see more on this at bangdb common To get the version
    VersionType getVersionType();
To set the version
    void setVersionType(VersionType version_type);
VersionType is an enum with values
BANGDB_DATA_VERSION_OFF
BANGDB_DATA_VERSION_ON
Please see more on this at bangdb common To get the sizehint of a table
TableSizeHint getTableSizeHint();
To set the sizehint of a table
void setTableSizeHint(TableSizeHint table_sz_hint);
TableSizeHint is an enum with values
TINY_TABLE_SIZE
SMALL_TABLE_SIZE
NORMAL_TABLE_SIZE,
BIG_TABLE_SIZE,
TABLE_SIZE_INVALID
Please see more on this at bangdb common To get key size for a table
int getKeySize();
To set key size for a table
void setKeySize(int key_sz);
Please see more on this at bangdb common To get LogSize in Mb
int getLogSizeMb();
To set Log Size in Mb
void setLogSizeMb(int log_sz_mb);
Please see more on this at bangdb common To get status of WalEnable
bool getWalEnabled();
To set WalEnable
void setWalEnabled(bool wal_enabled);
Please see more on this at bangdb common To get status for auto commit
bool getAutocommit();
To enable auto commit for single operation
void setAutocommit(bool autocommit);
To check whether Duplicate keys are allowed
bool getAllowDuplicate();
To set whether Duplicate keys are allowed in a table
void setAllowDuplicate(bool allow_duplicate);
To check if Revidx is enable
bool getAllowRevIdx();
To set whether Revidx is allowed or not
void setAllowRevIdx(bool allow_rev_idx);
To get value for Ttlsec
int getTtlsec();
To set value for Ttlsec
void setTtlsec(int ttlsec);
To delete TableEnv object
virtual ~TableEnv();

Was this article helpful to you? Yes No