Package asia.hombre.asyncqlitekt
Class AsyncQLiteStatement
-
- All Implemented Interfaces:
-
androidx.sqlite.SQLiteStatement
public final class AsyncQLiteStatement implements SQLiteStatementAn extension of the SQLiteStatement class that binds index values and declares indexes to get from the result.
- Since:
0.0.1
Ron Lauren Hombre
-
-
Field Summary
Fields Modifier and Type Field Description private Function1<AsyncQLiteResult, Unit>result
-
Method Summary
Modifier and Type Method Description final Function1<AsyncQLiteResult, Unit>getResult()final UnitsetResult(Function1<AsyncQLiteResult, Unit> result)UnitbindBlob(Integer index, ByteArray value)UnitbindBoolean(Integer index, Boolean value)UnitbindDouble(Integer index, Double value)UnitbindFloat(Integer index, Float value)UnitbindInt(Integer index, Integer value)UnitbindLong(Integer index, Long value)UnitbindNull(Integer index)UnitbindText(Integer index, String value)UnitclearBindings()Unitclose()Does nothing. IntegergetColumnCount()Does nothing. StringgetColumnName(Integer index)Does nothing. ByteArraygetBlob(Integer index)Declares that at index a ByteArray will be 'get' later. BooleangetBoolean(Integer index)Declares that at index a Boolean will be 'get' later. DoublegetDouble(Integer index)Declares that at index a Double will be 'get' later. FloatgetFloat(Integer index)Declares that at index a Float will be 'get' later. IntegergetInt(Integer index)Declares that at index a Int will be 'get' later. LonggetLong(Integer index)Declares that at index a Long will be 'get' later. StringgetText(Integer index)Declares that at index a String will be 'get' later. BooleanisNull(Integer index)Declares that at index a null value will be 'get' later. Unitreset()Resets all declared indexes. Booleanstep()Adds this AsyncQLiteStatement to the Job Queue to be consumed by the Consumer Thread. final <R extends Any> Unitasync(Function1<AsyncQLiteStatement, R> block)Opens a function with this object as the 'this' value. -
-
Method Detail
-
getResult
final Function1<AsyncQLiteResult, Unit> getResult()
-
setResult
final Unit setResult(Function1<AsyncQLiteResult, Unit> result)
-
bindBoolean
Unit bindBoolean(Integer index, Boolean value)
-
bindDouble
Unit bindDouble(Integer index, Double value)
-
clearBindings
Unit clearBindings()
-
close
@Deprecated(message = "This method is not used here.") Unit close()
Does nothing.
-
getColumnCount
@Deprecated(message = "This method is not used here.") Integer getColumnCount()
Does nothing.
-
getColumnName
@Deprecated(message = "This method is not used here.") String getColumnName(Integer index)
Does nothing.
-
getBlob
ByteArray getBlob(Integer index)
- Parameters:
index- 0-based index of the column.- Returns:
An empty ByteArray.
-
getBoolean
Boolean getBoolean(Integer index)
- Parameters:
index- 0-based index of the column.- Returns:
false
-
getDouble
Double getDouble(Integer index)
- Parameters:
index- 0-based index of the column.- Returns:
0.0
-
getText
String getText(Integer index)
- Parameters:
index- 0-based index of the column.- Returns:
An empty String.
-
isNull
Boolean isNull(Integer index)
Declares that at index a null value will be 'get' later.
- Parameters:
index- 0-based index of the column.- Returns:
false
-
step
Boolean step()
Adds this AsyncQLiteStatement to the Job Queue to be consumed by the Consumer Thread.
- Returns:
false
-
async
final <R extends Any> Unit async(Function1<AsyncQLiteStatement, R> block)
Opens a function with this object as the 'this' value.
Useful for binding, declaring, and reading the results.
-
-
-
-