Name

LIST-ATTRIBUTE-TYPES — Returns information about the attribute types of a table.Function

Syntax

      list-attribute-types table &key owner database => result

Arguments and Values

table

The name of a table as a string, symbol or SQL expression.

owner

A string, NIL or :all.

database

A database object which defaults to *default-database*.

result

A list.

Description

Returns a list containing information about the SQL types of each of the attributes in the table specified by table in database which has a default value of *default-database*. owner is NIL by default which means that only attributes owned by users are listed. If owner is a string denoting a user name, only attributes owned by owner are listed. If owner is :all then all attributes are listed. The elements of the returned list are lists where the first element is the name of the attribute, the second element is its SQL type, the third is the type precision, the fourth is the scale of the attribute and the fifth is 1 if the attribute accepts null values and otherwise 0.

Examples

(list-attribute-types [employee])
=> (("emplid" :INT4 4 NIL 0) ("groupid" :INT4 4 NIL 0)
    ("first_name" :VARCHAR 30 NIL 1) ("last_name" :VARCHAR 30 NIL 1)
    ("email" :VARCHAR 100 NIL 1) ("ecompanyid" :INT4 4 NIL 1)
    ("managerid" :INT4 4 NIL 1) ("height" :FLOAT8 8 NIL 1)
    ("married" :BOOL 1 NIL 1) ("birthday" :TIMESTAMP 8 NIL 1)
    ("bd_utime" :INT8 8 NIL 1))        
      

Side Effects

None.

Affected by

*default-database*

Exceptional Situations

None.

See Also

attribute-type
list-attribute-types

Notes

None.