Platforms to show: All Mac Windows Linux Cross-Platform
DuckResultMBS.ColumnIndex(ColumnName as String) as Integer
Function:
Looks up the column index.
Example:
Notes:
For best speed, please lookup column indexes once and cache it in a local variable.
Returns -1 if the column is not found with given name.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
Dim con As New DuckConnectionMBS // new in memory database
// make query with constant values
Dim result As DuckResultMBS = con.SQLSelect("SELECT 3 as Zahl")
// and show first one
MsgBox Str(result.ColumnIndex("Zahl")) // shows 0 for first column
For best speed, please lookup column indexes once and cache it in a local variable.
Returns -1 if the column is not found with given name.
DuckResultMBS.ColumnName(Column as Integer) as String
Function:
Returns the column name of the specified column.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
DuckResultMBS.ColumnType(Column as Integer) as Integer
Function:
Queries column type for a cell.
Example:
Notes:
See Type* constants.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
Dim con As New DuckConnectionMBS // new in memory database
// make query with constant values
Dim result As DuckResultMBS = con.SQLSelect("SELECT 3, 4")
// and show first one
MsgBox Str(result.ColumnType(0)) // shows 4 for Int32
DuckResultMBS.ColumnValues(Column as Integer) as Variant()
Function:
Queries values for a whole column.
Notes: Same as looping and gathering values with Value() function.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Same as looping and gathering values with Value() function.
Some examples using this method:
DuckResultMBS.Constructor private
Function:
The private constructor.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
DuckResultMBS.Destructor
Function:
The destructor.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
DuckResultMBS.IsNull(Column as Integer, Row as Integer) as Boolean
Function:
Checks whether a cell is NULL.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
DuckResultMBS.RowValues(Row as Integer) as Variant()
Function:
Queries values for a whole row.
Notes: Same as looping and gathering values with Value() function.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Same as looping and gathering values with Value() function.
Some examples using this method:
DuckResultMBS.Value(Column as Integer, Row as Integer) as Variant
Function:
Queries value for cell.
Notes: Depending on cell type, returns value as nil, boolean, Int32, Int64, Single, Double, or String.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Depending on cell type, returns value as nil, boolean, Int32, Int64, Single, Double, or String.
DuckResultMBS.ValueBoolean(Column as Integer, Row as Integer) as Boolean
Function:
Queries value as boolean.
Notes: Converts value if needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Converts value if needed.
DuckResultMBS.ValueDate(Column as Integer, Row as Integer) as Date
Function:
Queries value as Date object.
Example:
Notes:
Returns object on success and nil on failure.
Works for TypeDate and TypeTimestamp.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Example:
Dim con As New DuckConnectionMBS // new in memory database
// make query with constant value as date using CAST function
Dim result As DuckResultMBS = con.SQLSelect("SELECT CAST('2012-05-20' AS date)")
// and show first one
Dim d As date = result.ValueDate(0,0)
MsgBox d.AbbreviatedDate
Returns object on success and nil on failure.
Works for TypeDate and TypeTimestamp.
See also:
DuckResultMBS.ValueDate(Column as Integer, Row as Integer, byref Year as Integer, byref Month as Integer, byref Day as Integer) as Boolean
Function:
Queries value as date.
Notes:
Returns true on success and false on failure.
Works for TypeDate and TypeTimestamp.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes:
Returns true on success and false on failure.
Works for TypeDate and TypeTimestamp.
See also:
DuckResultMBS.ValueDateTime(Column as Integer, Row as Integer) as DateTime
Function:
Queries value as DateTime object.
Notes:
Returns object on success and nil on failure.
Works for TypeDate and TypeTimestamp.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes:
Returns object on success and nil on failure.
Works for TypeDate and TypeTimestamp.
DuckResultMBS.ValueDouble(Column as Integer, Row as Integer) as Double
Function:
Queries value as double.
Notes: Converts value if needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Converts value if needed.
DuckResultMBS.ValueHugeInt(Column as Integer, Row as Integer, byref lower as UInt64, byref upper as Int64) as Boolean
Function:
Queries value as huge int.
Notes:
For 128 bit integers.
Returns true on success and false on failure.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes:
For 128 bit integers.
Returns true on success and false on failure.
DuckResultMBS.ValueInt16(Column as Integer, Row as Integer) as Int16
Function:
Queries value as Int16.
Notes: Converts value if needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Converts value if needed.
DuckResultMBS.ValueInt32(Column as Integer, Row as Integer) as Int32
Function:
Queries value as Int32.
Notes: Converts value if needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Converts value if needed.
DuckResultMBS.ValueInt64(Column as Integer, Row as Integer) as Int64
Function:
Queries value as Int64.
Notes: Converts value if needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Converts value if needed.
DuckResultMBS.ValueInt8(Column as Integer, Row as Integer) as Int8
Function:
Queries value as Int8.
Notes: Converts value if needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Converts value if needed.
DuckResultMBS.ValueInterval(Column as Integer, Row as Integer, byref Months as Integer, byref Days as Integer, byref MilliSeconds as Int64) as Boolean
Function:
Queries value as interval.
Notes: Returns true on success and false on failure.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Returns true on success and false on failure.
DuckResultMBS.ValueSingle(Column as Integer, Row as Integer) as Single
Function:
Queries value as Single.
Notes: Converts value if needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Converts value if needed.
DuckResultMBS.ValueString(Column as Integer, Row as Integer) as String
Function:
Queries value as string.
Example:
Notes:
Converts value if needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
Dim con As New DuckConnectionMBS // new in memory database
// make query with constant values
Dim result As DuckResultMBS = con.SQLSelect("SELECT 3, 4")
// and show first one
MsgBox result.ValueString(0,0)
DuckResultMBS.ValueTime(Column as Integer, Row as Integer, byref Hour as Integer, byref Minute as Integer, byref Second as Integer, byref MilliSeconds as Integer) as Boolean
Function:
Queries value as time.
Notes:
Returns true on success and false on failure.
Works for TypeTime and TypeTimestamp.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DuckDB | MBS DuckDB Plugin | 21.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes:
Returns true on success and false on failure.
Works for TypeTime and TypeTimestamp.
The items on this page are in the following plugins: MBS DuckDB Plugin.
Feedback: Report problem or ask question.