MySQL BIGINTEGER type
Construct a BIGINTEGER.
MySQL BINARY type, for fixed length binary data
Construct a BINARY. This is a fixed length type, and short values will be right-padded with a server-version-specific pad value.
MySQL BLOB type, for binary data up to 2^16 bytes
Construct a BLOB. Arguments are:
MySQL CHAR type, for fixed-length character data.
Construct an NCHAR.
MySQL DECIMAL type
Construct a DECIMAL.
MySQL DOUBLE type
Construct a DOUBLE.
MySQL ENUM type.
Construct an ENUM.
Example:
Column('myenum', MSEnum("'foo'", "'bar'", "'baz'"))
Arguments are:
MySQL FLOAT type
Construct a FLOAT.
MySQL INTEGER type
Construct an INTEGER.
MySQL LONGTEXT type, for text up to 2^32 characters
Construct a LONGTEXT.
MySQL MEDIUMBLOB type, for binary data up to 2^24 bytes
MySQL MEDIUMTEXT type, for text up to 2^24 characters
Construct a MEDIUMTEXT.
MySQL NCHAR type, for fixed-length character data in the server's configured national character set.
Construct an NCHAR. Arguments are:
MySQL NVARCHAR type, for variable-length character data in the server's configured national character set.
Construct an NVARCHAR.
MySQL NUMERIC type
Construct a NUMERIC.
MySQL SMALLINTEGER type
Construct a SMALLINTEGER.
MySQL VARCHAR type, for variable-length character data.
Construct a VARCHAR.
MySQL TEXT type, for text up to 2^16 characters
Construct a TEXT.
MySQL TIMESTAMP type
To signal the orm to automatically re-select modified rows to retrieve the timestamp, add a PassiveDefault to your column specification:
from sqlalchemy.databases import mysql Column('updated', mysql.MSTimeStamp, PassiveDefault(text('CURRENT_TIMESTAMP()')))
MySQL TINYTEXT type, for text up to 2^8 characters
Construct a TINYTEXT.
MySQL VARBINARY type, for variable length binary data
Construct a VARBINARY. Arguments are:
MySQL YEAR type, for single byte storage of years 1901-2155
runs SHOW CREATE TABLE to get foreign key/options information about the table.
array(typecode [, initializer]) -> array
Return a new array whose items are restricted by typecode, and initialized from the optional initializer value, which must be a list, string. or iterable over elements of the appropriate type.
Arrays represent basic values and behave very much like lists, except the type of objects stored in them is constrained.
Methods:
append() -- append a new item to the end of the array buffer_info() -- return information giving the current memory info byteswap() -- byteswap all the items of the array count() -- return number of occurences of an object extend() -- extend array by appending multiple elements from an iterable fromfile() -- read items from a file object fromlist() -- append items from the list fromstring() -- append items from the string index() -- return index of first occurence of an object insert() -- insert a new item into the array at a provided position pop() -- remove and return item (default last) read() -- DEPRECATED, use fromfile() remove() -- remove first occurence of an object reverse() -- reverse the order of the items in the array tofile() -- write all items to a file object tolist() -- return the array converted to an ordinary list tostring() -- return the array converted to a string write() -- DEPRECATED, use tofile()
Attributes:
typecode -- the typecode character used to create the array itemsize -- the length in bytes of one array item