public class BTable extends Object implements BRefType<Object>, BCollection
BTable represents a data set in Ballerina.| Modifier and Type | Field and Description |
|---|---|
protected BStructType |
constraintType |
protected DataIterator |
iterator |
| Constructor and Description |
|---|
BTable() |
BTable(BType type,
BStruct configStruct) |
BTable(DataIterator dataIterator,
boolean loadSQLTableToMemory) |
BTable(String tableName,
BStructType constraintType) |
BTable(String query,
BTable fromTable,
BTable joinTable,
BStructType constraintType,
BRefValueArray params) |
| Modifier and Type | Method and Description |
|---|---|
void |
addData(BStruct data) |
void |
addData(BStruct data,
Context context) |
void |
close(boolean isInTransaction) |
BValue |
copy()
Deep copy
BValue. |
protected void |
finalize() |
protected void |
generateIterator() |
Object[] |
getArray(int columnIndex) |
String |
getBlob(int columnIndex) |
boolean |
getBoolean(int columnIndex) |
List<ColumnDefinition> |
getColumnDefs() |
double |
getFloat(int columnIndex) |
long |
getInt(int columnIndex) |
BStruct |
getNext() |
String |
getString(int columnIndex) |
Object[] |
getStruct(int columnIndex) |
BStructType |
getStructType() |
BType |
getType() |
boolean |
hasNext(boolean isInTransaction) |
protected boolean |
isIteratorGenerationConditionMet() |
protected boolean |
iteratorResetRequired() |
BIterator |
newIterator()
Create new Iterator for this collection.
|
void |
next() |
void |
performAddOperation(BStruct data,
Context context)
Performs addition of a record to the database.
|
void |
performRemoveOperation(Context context,
BFunctionPointer lambdaFunction)
Performs Removal of records matching the condition defined by the provided lambda function.
|
void |
reset(boolean isInTransaction) |
protected void |
resetIterationHelperAttributes() |
String |
stringValue() |
Object |
value() |
protected DataIterator iterator
protected BStructType constraintType
public BTable()
public BTable(DataIterator dataIterator, boolean loadSQLTableToMemory)
public BTable(String tableName, BStructType constraintType)
public BTable(String query, BTable fromTable, BTable joinTable, BStructType constraintType, BRefValueArray params)
public String stringValue()
stringValue in interface BValuepublic boolean hasNext(boolean isInTransaction)
public void next()
public void close(boolean isInTransaction)
public void reset(boolean isInTransaction)
public BStruct getNext()
public void performAddOperation(BStruct data, Context context)
data - The record to be insertedcontext - The context which represents the runtime state of the program that called "table.add"public void addData(BStruct data)
public void performRemoveOperation(Context context, BFunctionPointer lambdaFunction)
context - The context which represents the runtime state of the program that called "table.remove"lambdaFunction - The function that decides the condition of data removalpublic String getString(int columnIndex)
public long getInt(int columnIndex)
public double getFloat(int columnIndex)
public boolean getBoolean(int columnIndex)
public String getBlob(int columnIndex)
public Object[] getStruct(int columnIndex)
public Object[] getArray(int columnIndex)
public List<ColumnDefinition> getColumnDefs()
public BStructType getStructType()
public BIterator newIterator()
BCollectionnewIterator in interface BCollectionprotected void generateIterator()
protected boolean isIteratorGenerationConditionMet()
protected void resetIterationHelperAttributes()
protected boolean iteratorResetRequired()
Copyright © 2018 WSO2. All rights reserved.