Database Independent Abstraction Layer for C: libdbi Programmer's Guide | ||
---|---|---|
Prev | Chapter 7. libdbi API Reference | Next |
Returns the length of the value stored in the specified field which contains a string or a binary string.
Result: The target query result.
fieldname: The name of the target field.
The length in bytes of the target field data, excluding the terminating zero byte, or DBI_LENGTH_ERROR in case of an error. The return value is 0 for field types other than string or binary string. In case of an error the error number is one of DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, or DBI_ERROR_BADIDX.
Returns the length of the value stored in the specified field which contains a string or a binary string.
Result: The target query result.
idx: The index of the target field (starting at 1).
The length in bytes of the target field data, excluding the terminating zero byte, or DBI_LENGTH_ERROR in case of an error. The return value is 0 for field types other than string or binary string. In case of an error the error number is one of DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, or DBI_ERROR_BADIDX.
Returns the size in bytes of the value stored in the specified field.
Note: This function is deprecated. Use dbi_result_get_field_length instead.
Returns the size in bytes of the value stored in the specified field.
Note: This function is deprecated. Use dbi_result_get_field_length_idx instead.
Given a field's name, return that field's numeric index.
Result: The target query result.
fieldname: The name of the target field.
The index (starting at 1) of the target field, or 0 in case of an error. In that case, the error number is DBI_ERROR_BADPTR.
Given a field's numeric index, return that field's name.
Result: The target query result.
idx: The index of the target field (starting at 1).
The target field's name, or NULL in case of an error. In that case the error number is one of DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, or DBI_ERROR_BADIDX.
Returns the number of fields in the query result.
Result: The target query result.
The number of fields in the query result, or DBI_FIELD_ERROR in case of an error.
Returns the target field's data type. The constants returned by this function are defined in dbi.h with the prefix "DBI_TYPE_".
Result: The target query result.
fieldname: The target field's name.
The target field's data type, or DBI_TYPE_ERROR in case of an error. In the latter case the error number is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.
Returns the target field's data type. The constants returned by this function are defined in dbi.h with the prefix "DBI_TYPE_".
Result: The target query result.
idx: The index of the target field (starting at 1).
The target field's data type, or DBI_TYPE_ERROR in case of an error. In the latter case the error number is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.
unsigned int dbi_result_get_field_attrib
(dbi_result Result, const char *fieldname, unsigned int attribmin, unsigned int attribmax);
Returns the target field's data type attributes in the specified range. The constants returned by this function are defined in include/dbi/dbi.h with the prefix "DBI_", followed by the name of the field's datatype.
Result: The target query result.
fieldname: The target field's name.
attribmin: The first attribute value in the range of attributes to extract.
attribmax: The last attribute value in the range of attributes to extract. This may be the same as attribmin if you are only trying to extract a single attribute value.
The target field's requested attribute range, or DBI_ATTRIBUTE_ERROR in case of an error. In the latter case the error number is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.
unsigned int dbi_result_get_field_attrib_idx
(dbi_result Result, unsigned int idx, unsigned int attribmin, unsigned int attribmax);
Returns the target field's data type attributes in the specified range. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.
Result: The target query result.
idx: The index of the target field (starting at 1).
attribmin: The first attribute value in the range of attributes to extract.
attribmax: The last attribute value in the range of attributes to extract. This may be the same as attribmin if you are only trying to extract a single attribute value.
The target field's requested attribute range, or DBI_ATTRIBUTE_ERROR in case of an error. In the latter case the error number is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.
Returns the target field's data type attributes. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.
Result: The target query result.
fieldname: The target field's name.
The target field's attributes, or DBI_ATTRIBUTE_ERROR in case of an error. In case of an error the error number is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.
Returns the target field's data type attributes. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.
Result: The target query result.
fieldidx: The index of the target field (starting at 1).
The target field's attributes, or DBI_ATTRIBUTE_ERROR in case of an error. In that case the error number is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.
Determines whether the indicated field contains a NULL value.
Result: The target query result.
fieldname: The name of the target field.
1 if the field contains a NULL value, otherwise 0, or DBI_FIELD_FLAG_ERROR in case of an error. In the latter case the error number is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.
Determines whether the indicated field contains a NULL value.
Result: The target query result.
fieldidx: The index of the target field (starting at 1).
1 if the field contains a NULL value, otherwise 0, or DBI_FIELD_FLAG_ERROR in case of an error. In the latter case the error number is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.