TableEnv (Embedded) Type
TableEnv (embedded) 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++
Java
To create TableEnv (embedded) 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 tableINMEM_ONLY
INMEM_PERSIST
PERSIST_ONLY
Please see more on this at bangdb common
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 tableHASH,
EXTHASH
BTREE,
HEAP
Please see more on this at bangdb common
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 typeSHARED_LOG,
PRIVATE_LOG,
INVALID_LOG
Please see more on this at bangdb common
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 typeNORMAL_TABLE
WIDE_TABLE
INDEX_TABLE
PRIMITIVE_INT
PRIMITIVE_TABLE_LONG
PRIMITIVE_TABLE_STRING
LARGE_TABLE
Please see more on this at bangdb common
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 get the sorting method for a tableNORMAL_KEY = 1
COMPOSITE_KEY = 3
NORMAL_KEY_LONG = 10
Please see more on this at bangdb common
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 tableLEXICOGRAPH = 1,
QUASI_LEXICOGRAPH = 2,
SORT_METHOD_INVALID = 100
Please see more on this at bangdb common
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 subtypeSORT_ASCENDING = 3,
SORT_DESCENDING = 4
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 tableBANGDB_SW_TABLE
BANGDB_TOPK_TABLE
NON_ANALYTICAL_TABLE
INDEXBTREE_TABLE
DUPLINDEX_TABLE_NOLOG
Please see more on this at bangdb common
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 versionPRIMITIVE_INT
PRIMITIVE_LONG
PRIMITIVE_STRING,
PRIMITIVE_INVALID
Please see more on this at bangdb common
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 tableBANGDB_DATA_VERSION_OFF
BANGDB_DATA_VERSION_ON
Please see more on this at bangdb common
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 tableTINY_TABLE_SIZE
SMALL_TABLE_SIZE
NORMAL_TABLE_SIZE,
BIG_TABLE_SIZE,
TABLE_SIZE_INVALID
Please see more on this at bangdb common
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 (Embedded) object
virtual ~TableEnv();TableEnv (embedded)
Creating TableEnv object
public TableEnv()To get the PersistType set
public PersistType getDbType()To set the PersistType for DB
public void setDbType(PersistType db_type)This set type of db, in-memory or persistent. Default is persistent.
PersistType is an enum with values
INMEM_ONLY
INMEM_PERSIST
PERSIST_ONLY
Please see more on this at bangdb common
To get the indextype setINMEM_ONLY
INMEM_PERSIST
PERSIST_ONLY
Please see more on this at bangdb common
public IndexType getIdxType()To set the indextype for a table
public void setIdxType(IndexType idx_type)To get LogType set
public LogType getTableLogType()To set LogType
public void setTableLogType(LogType table_log_type)BangDB can create write ahead log in shared and in private mode.To get TableType for a table
public TableType getTableType()To set TableType
public void setTableType(TableType table_type)
TableType is an enum with values
NORMAL_TABLE
WIDE_TABLE
INDEX_TABLE
PRIMITIVE_TABLE_INT
PRINITIVE_TABLE_LONG
PRIMITIVE_TABLE_STRING
LARGE_TABLE
Please see more on this at bangdb common
To get Keytype set for a tableNORMAL_TABLE
WIDE_TABLE
INDEX_TABLE
PRIMITIVE_TABLE_INT
PRINITIVE_TABLE_LONG
PRIMITIVE_TABLE_STRING
LARGE_TABLE
Please see more on this at bangdb common
public KeyType getKeyType()To set the KeyType for a table
public void setKeyType(KeyType key_type)
The KeyType is an enum with values
NORMAL_KEY
COMPOSITE_KEY
NORMAL_KEY_LONG
Please see more on this at bangdb common
To get the Sorting method set for a tableNORMAL_KEY
COMPOSITE_KEY
NORMAL_KEY_LONG
Please see more on this at bangdb common
public SortMethod getSortMethod()To set the sorting method for a table
public void setSortMethod(SortMethod sort_method)
SortMethod is an enum with values
LEXICOGRAPH,
QUASI_LEXICOGRAPH
Please see more on this at bangdb common
To get Sorting Direction set for a tableLEXICOGRAPH,
QUASI_LEXICOGRAPH
Please see more on this at bangdb common
public SortDirection getSortDirection()To set sorting direction for a table
public void setSortDirection(SortDirection sort_direction)
Here, SortDirection is an enum with values
SORT_ASCENDING,
SORT_DESCENDING
Please see more on this at bangdb common
To get the Table subtypeSORT_ASCENDING,
SORT_DESCENDING
Please see more on this at bangdb common
public TableSubType getTblSubType()To set the subtype for a table
public 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
Please see more on this at bangdb common
To get the Primitive Data Type setBANGDB_SW_TABLE,
BANGDB_TOPK_TABLE,
NON_ANALYTICAL_TABLE,
INDEXBTREE_TABLE
DUPLINDEX_TABLE
Please see more on this at bangdb common
public PrimitiveDataType getPrimDataType()To set Primitive data type
public void setPrimDataType(PrimitiveDataType prim_data_type)
Here, PrimitiveDataType is an enum with values
PRIMITIVE_INT,
PRIMITIVE_LONG,
PRIMITIVE_STRING
Please see more on this at bangdb common
To get Version type setPRIMITIVE_INT,
PRIMITIVE_LONG,
PRIMITIVE_STRING
Please see more on this at bangdb common
public VersionType getVersionType()To set Version type
public void setVersionType(VersionType version_type)
VersionType is an enum with values
BANGDB_DATA_VERSION_INVALID,
BANGDB_DATA_VERSION_VALID
Please see more on this at bangdb common
To get Table Size hint set select for a tableBANGDB_DATA_VERSION_INVALID,
BANGDB_DATA_VERSION_VALID
Please see more on this at bangdb common
public TableSizeHint getTableSizeHint()To set the TableSizeHint for a table
public void setTableSizeHint(TableSizeHint table_sz_hint)
The TableTypeHint is an enum with values
TINY_TABLE_SIZE,
SMALL_TABLE_SIZE,
NORMAL_TABLE_SIZE,
BIG_TABLE_SIZE;
Please see more on this at bangdb common
To get the size of key valueTINY_TABLE_SIZE,
SMALL_TABLE_SIZE,
NORMAL_TABLE_SIZE,
BIG_TABLE_SIZE;
Please see more on this at bangdb common
public int getKeySize()To set the size of a key
public void setKeySize(int key_sz)To get the value for Log size in Mb
public int getLogSizeMb()To set the Log size in Mb
public void setLogSizeMb(int log_sz_mb)To check WalEnabled status
public int getWalEnabled()To set WalEnabled
public void setWalEnabled(int wal_enabled)To check if Duplicates are allowed or not for a table
public int getAllowDuplicate()To set whether duplicates should be allowed or not for a table
public void setAllowDuplicate(int allow_duplicate)To check whether Revidx is enable or not
public int getAllowRevIdx()To set whether revidx is allowed or not
public void setAllowRevIdx(int allow_rev_idx)set to allow reverse indexing. Note that it can only be done for WIDE_TABLE To get Ttlsec value set
public int getTtlsec() {To set the Ttlsec
public void setTtlsec(int ttlsec)This is to set whether to use ssl/tls based secure channel or not