Method Msql.msql()->list_fields()
- Method
list_fields
mapping(string:mapping(string:mixed)) list_fields(stringtable)- Description
Returns a mapping describing the fields of a table in the database. The returned value is a mapping, indexed on the column name, of mappings. These contain currently the fields:
"type":stringDescribes the field's mSQL data type ("char","integer",...)
"length":intIt describes the field's length. It is only interesting for char() fields, in fact. Also notice that the strings returned by msql->query() have the correct length. This field only specifies the _maximum_ length a "char()" field can have.
"table":stringThe table this field is in. Added only for interface compliancy.
"flags":multiset(string)It's a multiset containing textual descriptions of the server's flags associated with the current field. Currently it can be empty, or contain "unique" or "not null".
- Note
The version of this function in the Msql.msql() program is not sql-interface compliant (this is the main reason why using that program directly is deprecated). Use Sql.Sql instead.
- See also