.. autoclass:: Boolean
:show-inheritance:
+ :members:
.. autoclass:: Date
:show-inheritance:
+ :members:
.. autoclass:: DateTime
:show-inheritance:
+ :members:
.. autoclass:: Enum
:show-inheritance:
.. autoclass:: Integer
:show-inheritance:
+ :members:
.. autoclass:: Interval
:show-inheritance:
+ :members:
.. autoclass:: LargeBinary
:show-inheritance:
+ :members:
.. autoclass:: Numeric
:show-inheritance:
.. autoclass:: PickleType
:show-inheritance:
+ :members:
.. autoclass:: SchemaType
:show-inheritance:
.. autoclass:: SmallInteger
:show-inheritance:
+ :members:
.. autoclass:: String
:show-inheritance:
+ :members:
.. autoclass:: Text
:show-inheritance:
+ :members:
.. autoclass:: Time
:show-inheritance:
+ :members:
.. autoclass:: Unicode
:show-inheritance:
+ :members:
.. autoclass:: UnicodeText
:show-inheritance:
+ :members:
SQL Standard Types
------------------
A full, foolproof :class:`~sqlalchemy.schema.Table` is therefore::
- users_table = Table('users', metadata,
+ users = Table('users', metadata,
Column('id', Integer, Sequence('user_id_seq'), primary_key=True),
Column('name', String(50)),
Column('fullname', String(50)),
>>> result.inserted_primary_key
[1]
-The value of ``1`` was automatically generated by SQLite, but only because we did not specify the ``id`` column in our :class:`~sqlalchemy.sql.expression.Insert` statement; otherwise, our explicit value would have been used. In either case, SQLAlchemy always knows how to get at a newly generated primary key value, even though the method of generating them is different across different databases; each databases' :class:`~sqlalchemy.engine.base.Dialect` knows the specific steps needed to determine the correct value (or values; note that ``inserted_primary_key`` returns a list so that it supports composite primary keys).
+The value of ``1`` was automatically generated by SQLite, but only because we did not specify the ``id`` column in our :class:`~sqlalchemy.sql.expression.Insert` statement; otherwise, our explicit value would have been used. In either case, SQLAlchemy always knows how to get at a newly generated primary key value, even though the method of generating them is different across different databases; each database's :class:`~sqlalchemy.engine.base.Dialect` knows the specific steps needed to determine the correct value (or values; note that ``inserted_primary_key`` returns a list so that it supports composite primary keys).
Executing Multiple Statements
==============================
*length* for use in DDL, and will raise an exception when
the ``CREATE TABLE`` DDL is issued. Whether the value is
interpreted as bytes or characters is database specific.
-
+
+ :param \**kwargs: passed through to the underlying ``String``
+ type.
+
"""
kwargs.setdefault('convert_unicode', True)
kwargs.setdefault('assert_unicode', 'warn')
"""Construct an Interval object.
:param native: when True, use the actual
- INTERVAL type provided by the database, if
- supported (currently Postgresql, Oracle).
- Otherwise, represent the interval data as
- an epoch value regardless.
+ INTERVAL type provided by the database, if
+ supported (currently Postgresql, Oracle).
+ Otherwise, represent the interval data as
+ an epoch value regardless.
:param second_precision: For native interval types
- which support a "fractional seconds precision" parameter,
- i.e. Oracle and Postgresql
+ which support a "fractional seconds precision" parameter,
+ i.e. Oracle and Postgresql
:param day_precision: for native interval types which
- support a "day precision" parameter, i.e. Oracle.
+ support a "day precision" parameter, i.e. Oracle.
"""
super(Interval, self).__init__()
def test_profile_2_insert(self):
self.test_baseline_2_insert()
+ # this number...
@profiling.function_call_count(6783, {'2.6':7194})
def test_profile_3_properties(self):
self.test_baseline_3_properties()
+ # and this number go down slightly when using the C extensions
@profiling.function_call_count(22510, {'2.6':24055})
def test_profile_4_expressions(self):
self.test_baseline_4_expressions()