Column Class

The column class represents a Column in a pysk.db.Table.

Interface

class pysk.db.Column(name=None, dataType=None, allowsNull=False, index=None, defaultValue=None, extra='')

Represenation of a single column in a MySQL Table

Parameters:
  • name – Column name
  • dataType – Data type
  • allowsNull – True if and only if NULL is a valid value
  • index – Index type of this column. PRI (primary), UNI (unique) or MUL (multiple)
  • defaultValue – The default value for the column
  • extra – Extra information, such as ‘auto_increment’
default()

Default value as escaped string required in MySQL statements

Returns:‘<val>’ or NULL
hasAutoIncrement()

Check if column is incremented automatically

Returns:True if and only if the current column is incremented automatically
isPrimaryIndex()

Check if column is the primary index

Returns:True if and only if the current column is the primary index