Method: Amalgalite::SQLite3::Statement#column_type

Defined in:
ext/amalgalite/c/amalgalite_statement.c

#column_type(index) ⇒ SQLite3::DataType constant

Return the column type at the ith column in the result set. The left-most column is number 0.

Returns:

  • (SQLite3::DataType constant)


358
359
360
361
362
363
364
365
# File 'ext/amalgalite/c/amalgalite_statement.c', line 358

VALUE am_sqlite3_statement_column_type(VALUE self, VALUE v_idx)
{
    am_sqlite3_stmt   *am_stmt;
    int               idx = FIX2INT( v_idx );

    Data_Get_Struct(self, am_sqlite3_stmt, am_stmt);
    return INT2FIX( sqlite3_column_type( am_stmt->stmt, idx ) );
}