Skip to content

apitabledefinitionstring

Troy Murray edited this page Sep 19, 2011 · 2 revisions

string()

Usage

Adds a string column definition to the table definition object

Function Syntax

t.string(columnNames[,default,null,limit]);

Parameters

Parameter Type Required Default Description
columnNames string Yes one or more column names, comma delimited
default integer | float No NULL default value for column
null boolean No if nulls are allowed
limit integer No character size limit for column

Example

t.string(columnNames="familyname",default="",null=true,limit="255");

Notes

Please check your database documentation for maximum limits for string (VARCHAR) data types.

Clone this wiki locally