1,1,4 release, fix postgresql quirks.
[freeside.git] / htdocs / docs / man / dbdef_column.txt
1 NAME
2     FS::dbdef_column - Column object
3
4 SYNOPSIS
5       use FS::dbdef_column;
6
7       $column_object = new FS::dbdef_column ( $name, $sql_type, '' );
8       $column_object = new FS::dbdef_column ( $name, $sql_type, 'NULL' );
9       $column_object = new FS::dbdef_column ( $name, $sql_type, '', $length );
10       $column_object = new FS::dbdef_column ( $name, $sql_type, 'NULL', $length );
11
12       $name = $column_object->name;
13       $column_object->name ( 'name' );
14
15       $name = $column_object->type;
16       $column_object->name ( 'sql_type' );
17
18       $name = $column_object->null;
19       $column_object->name ( 'NOT NULL' );
20
21       $name = $column_object->length;
22       $column_object->name ( $length );
23
24       $sql_line = $column->line;
25       $sql_line = $column->line $datasrc;
26
27 DESCRIPTION
28     FS::dbdef::column objects represend columns in tables (see the
29     FS::dbdef_table manpage).
30
31 METHODS
32     new Creates a new FS::dbdef_column object.
33
34     name
35         Returns or sets the column name.
36
37     type
38         Returns or sets the column type.
39
40     null
41         Returns or sets the column null flag.
42
43     type
44         Returns or sets the column length.
45
46     line [ $datasrc ]
47         Returns an SQL column definition.
48
49         If passed a DBI $datasrc specifying the DBD::mysql manpage
50         or the DBD::Pg manpage, will use engine-specific syntax.
51
52 BUGS
53 SEE ALSO
54     the FS::dbdef_table manpage, the FS::dbdef manpage, the DBI
55     manpage
56
57 VERSION
58     $Id: dbdef_column.txt,v 1.5 1999-04-08 13:39:32 ivan Exp $
59
60 HISTORY
61     class for dealing with column definitions
62
63     ivan@sisd.com 98-apr-17
64
65     now methods can be used to get or set data ivan@sisd.com 98-may-
66     11
67
68     mySQL-specific hack for null (what should be default?)
69     ivan@sisd.com 98-jun-2
70
71     $Log: dbdef_column.txt,v $
72     Revision 1.5  1999-04-08 13:39:32  ivan
73     convert from pod for 1.2.0 release
74  Revision 1.3 1998/10/13 13:04:17 ivan
75     fixed doc to indicate Pg specific syntax too
76
77     Revision 1.2 1998/10/12 23:40:28 ivan added Pg-specific
78     behaviour in sub line
79