BangDB Table Env Type
Client API
Table Env 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++
Java
To create Table Env 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 INMEM_ONLY
INMEM_PERSIST
PERSIST_ONLY
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 HASH,
EXTHASH
BTREE,
HEAP
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 SHARED_LOG,
PRIVATE_LOG,
INVALID_LOG
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 NORMAL_TABLE
WIDE_TABLE
INDEX_TABLE
PRIMITIVE_INT
PRIMITIVE_TABLE_LONG
PRIMITIVE_TABLE_STRING
LARGE_TABLE
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 NORMAL_KEY = 1
COMPOSITE_KEY = 3
NORMAL_KEY_LONG = 10
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 LEXICOGRAPH = 1,
QUASI_LEXICOGRAPH = 2,
SORT_METHOD_INVALID = 100
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 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 BANGDB_SW_TABLE
BANGDB_TOPK_TABLE
NON_ANALYTICAL_TABLE
INDEXBTREE_TABLE
DUPLINDEX_TABLE_NOLOG
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 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);To get LogSize in Mb
int getLogSizeMb();To set Log Size in Mb
void setLogSizeMb(int log_sz_mb);To get status of WalEnable
bool getWalEnabled();To set WalEnable
void setWalEnabled(bool wal_enabled);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 Table Env object
virtual ~Table Env();
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 INMEM_ONLY
INMEM_PERSIST
PERSIST_ONLY
To get the indextype set
public IndexType getIdxType()To set the indextype for a table
public void setIdxType(IndexType idx_type)
Here, indexType is an enum with values
HASH
EXTHASH
BTREE
HEAP
Please see more on this at bangdb common HASH
EXTHASH
BTREE
HEAP
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.
The LogType is an enum with values
SHARED_LOG
PRIVATE_LOG
Please see more on this at bangdb common SHARED_LOG
PRIVATE_LOG
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 NORMAL_TABLE
WIDE_TABLE
INDEX_TABLE
PRIMITIVE_TABLE_INT
PRINITIVE_TABLE_LONG
PRIMITIVE_TABLE_STRING
LARGE_TABLE
To get Keytype set for a table
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 NORMAL_KEY
COMPOSITE_KEY
NORMAL_KEY_LONG
To get the Sorting method set for a table
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 LEXICOGRAPH,
QUASI_LEXICOGRAPH
To get Sorting Direction set for a table
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 SORT_ASCENDING,
SORT_DESCENDING
To get the Table subtype
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 BANGDB_SW_TABLE,
BANGDB_TOPK_TABLE,
NON_ANALYTICAL_TABLE,
INDEXBTREE_TABLE
DUPLINDEX_TABLE
To get the Primitive Data Type set
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 PRIMITIVE_INT,
PRIMITIVE_LONG,
PRIMITIVE_STRING
To get Version type set
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 BANGDB_DATA_VERSION_INVALID,
BANGDB_DATA_VERSION_VALID
To get Table Size hint set select for a table
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 TINY_TABLE_SIZE,
SMALL_TABLE_SIZE,
NORMAL_TABLE_SIZE,
BIG_TABLE_SIZE;
To get the size of key value
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 PersistType for DB
public PersistType getDb_type()To check if auto commit is enabled for an operation
public int getAutocommit()To set auto commit for an operation
public void setAutocommit(int autocommit)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