From: Mike Bayer Date: Tue, 23 Feb 2010 20:15:34 +0000 (+0000) Subject: - typos X-Git-Tag: rel_0_6beta2~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0d1a042711429bcac969cf53c442309dbcc0540;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - typos - type classes have a lot of detail in their constructors --- diff --git a/doc/build/reference/sqlalchemy/types.rst b/doc/build/reference/sqlalchemy/types.rst index 0b26a83c26..52a2b94e2a 100644 --- a/doc/build/reference/sqlalchemy/types.rst +++ b/doc/build/reference/sqlalchemy/types.rst @@ -40,12 +40,15 @@ Standard Types`_ and the other sections of this chapter. .. autoclass:: Boolean :show-inheritance: + :members: .. autoclass:: Date :show-inheritance: + :members: .. autoclass:: DateTime :show-inheritance: + :members: .. autoclass:: Enum :show-inheritance: @@ -57,12 +60,15 @@ Standard Types`_ and the other sections of this chapter. .. autoclass:: Integer :show-inheritance: + :members: .. autoclass:: Interval :show-inheritance: + :members: .. autoclass:: LargeBinary :show-inheritance: + :members: .. autoclass:: Numeric :show-inheritance: @@ -70,6 +76,7 @@ Standard Types`_ and the other sections of this chapter. .. autoclass:: PickleType :show-inheritance: + :members: .. autoclass:: SchemaType :show-inheritance: @@ -78,21 +85,27 @@ Standard Types`_ and the other sections of this chapter. .. 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 ------------------ diff --git a/doc/build/sqlexpression.rst b/doc/build/sqlexpression.rst index b1b0ba575e..90da5a494c 100644 --- a/doc/build/sqlexpression.rst +++ b/doc/build/sqlexpression.rst @@ -106,7 +106,7 @@ Next, to tell the :class:`~sqlalchemy.schema.MetaData` we'd actually like to cre 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)), @@ -169,7 +169,7 @@ What about the ``result`` variable we got when we called ``execute()`` ? As the >>> 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 ============================== diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index e7a60e9a77..49ee3dbf33 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -706,7 +706,10 @@ class Unicode(String): *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') @@ -1402,17 +1405,17 @@ class Interval(_DateAffinity, TypeDecorator): """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__() diff --git a/test/aaa_profiling/test_zoomark_orm.py b/test/aaa_profiling/test_zoomark_orm.py index fc3c1cba56..220925b6a3 100644 --- a/test/aaa_profiling/test_zoomark_orm.py +++ b/test/aaa_profiling/test_zoomark_orm.py @@ -299,10 +299,12 @@ class ZooMarkTest(TestBase): 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()