a record to hold return columns for a given statement
More...
List of all members.
Detailed Description
a record to hold return columns for a given statement
Definition at line 771 of file mysqlpl.d.
Constructor & Destructor Documentation
Definition at line 773 of file mysqlpl.d.
References get_column_count(), and mysqlpl::version().
{
_stmt = stmt;
int column_cnt = stmt.get_column_count();
_columns = new ColumnDataVector(column_cnt);
MYSQL_FIELD* fields = mysqlpl_fetch_fields(stmt.get_meta_res());
foreach(ColumnData col; _columns) {
col._type.init(fields);
fields = mysqlpl_next_field(fields);
version(MYSQLPL_PREP_STMT) {
col._column = new SqlVariant(col._type._data_type);
}
}
}
Member Function Documentation
int* mysqlpl::SqlRecord::find_column |
( |
in char[] |
col_name ) |
[inline, protected] |
int mysqlpl::SqlRecord::get_column_count |
( |
) |
[inline] |
int mysqlpl::SqlRecord::get_column_idx |
( |
in char[] |
col_name ) |
[inline, protected] |
Definition at line 899 of file mysqlpl.d.
{
int* found = find_column(col_name);
if (found)
return *found;
else {
throw new MSqlException("column not found");
}
}
ColumnType mysqlpl::SqlRecord::get_column_type |
( |
in char[] |
col_name ) |
[inline] |
Definition at line 825 of file mysqlpl.d.
{
int* found = find_column(col_name);
if (found)
return _columns[*found]._type;
else {
throw new MSqlException("column not found");
return null;
}
}
ColumnType mysqlpl::SqlRecord::get_column_type |
( |
int |
idx ) |
[inline] |
void mysqlpl::SqlRecord::print_columns |
( |
Stream |
o ) |
[inline] |
void mysqlpl::SqlRecord::print_values |
( |
Stream |
o ) |
[inline] |
mysqlpl::SqlRecord::version |
( |
MYSQLPL_PREP_STMT |
) |
[inline] |
Definition at line 801 of file mysqlpl.d.
{
SqlVariant get_column(int idx)
{
return _columns[idx]._column;
}
SqlVariant get_column(in char[] col_name)
{
int* found = find_column(col_name);
if (found)
return _columns[*found]._column;
else {
throw new MSqlException("column not found");
return null;
}
}
}
mysqlpl::SqlRecord::version |
( |
XMLSTORAGE |
) |
[inline] |
Definition at line 876 of file mysqlpl.d.
{
void dump_values(XMLStorage.XMLPos o);
}
Member Data Documentation
The documentation for this class was generated from the following file: