Commit Graph

45 Commits

Author SHA1 Message Date
Mike Bayer 9520c878b6 - emphasized query.join() in ORM tutorial as per [ticket:1708]
- cleaned up tutorial w.r.t. eagerload, added a section for contains_eager as this function
is equally important
- added better linkages in sqlalchemy.orm reference documentation, updated antiquated
docs for contains_eager(), got aliased()/AliasedClass documented as well as Sphinx will
allow us
2010-03-10 18:29:32 -05:00
Mike Bayer 969c04860f almost there, some tests failing still. 2010-03-09 13:41:43 -05:00
Mike Bayer f60a5fbd5d - merge -r6823:6841 of branches/chrisw_mixin
- declarative now accepts mixin classes directly, as a means
to provide common functional and column-based elements on
all subclasses, as well as a means to propagate a fixed
set of __table_args__ or __mapper_args__ to subclasses.
For custom combinations of __table_args__/__mapper_args__ from
an inherited mixin to local, descriptors can now be used.
New details are all up in the Declarative documentation.
Thanks to Chris Withers for putting up with my strife
on this. [ticket:1707]
2010-02-25 23:15:39 +00:00
Mike Bayer f0d1a04271 - typos
- type classes have a lot of detail in their constructors
2010-02-23 20:15:34 +00:00
Mike Bayer d0d5f79240 - Made sqlalchemy.sql.expressions.Executable part of public
API, used for any expression construct that can be sent to
    execute().  FunctionElement now inherits Executable so that
    it gains execution_options(), which are also propagated
    to the select() that's generated within execute().
    Executable in turn subclasses _Generative which marks
    any ClauseElement that supports the @_generative
    decorator - these may also become "public" for the benefit
    of the compiler extension at some point.
2010-02-12 19:54:49 +00:00
Mike Bayer 73bfc87669 - Added a tuple_() construct, allows sets of expressions
to be compared to another set, typically with IN against
composite primary keys or similar.  Also accepts an
IN with multiple columns.   The "scalar select can
have only one column" error message is removed - will
rely upon the database to report problems with
col mismatch.
2010-01-25 21:04:50 +00:00
Mike Bayer fc92d14bbe - types.Binary is renamed to types.LargeBinary, it only
produces BLOB, BYTEA, or a similar "long binary" type.
New base BINARY and VARBINARY
types have been added to access these MySQL/MS-SQL specific
types in an agnostic way [ticket:1664].
2010-01-23 19:44:06 +00:00
Mike Bayer 943259264f doc updates partially from [ticket:1651] 2010-01-17 18:00:01 +00:00
Mike Bayer 0156f1a9a7 - rename "myconnpy" to "mysqlconnector"
- remove all bug workarounds in mysqlconnector dialect
- add mysqlconnector as one of two "official" DBAPIs for MySQL
2010-01-04 16:26:01 +00:00
Mike Bayer a2c727788e add documentation for Numeric/Float types, [ticket:1624] 2010-01-03 19:11:37 +00:00
Mike Bayer 87ff3c679c add a brief doc for custom DDL 2010-01-03 18:22:50 +00:00
Mike Bayer 52d99aaa97 - clarify ForeignKey docs, copy operation
- link all classes/functions in expressions
2010-01-02 18:20:08 +00:00
Mike Bayer 33f2e2bfbb - Column() supports a keyword argument "sqlite_autoincrement", which
applies the SQLite keyword "AUTOINCREMENT" to columns within DDL -
will prevent generation of a separate PRIMARY KEY constraint.
[ticket:1016]
- added docs
- fixed underlines in mysql.rst
2009-12-18 21:08:35 +00:00
Mike Bayer 404be6e761 - added _with_options() to Connection. not publicizing this yet.
- updated oursql driver with latest fixes using options. [ticket:1613]
- all the MySQL drivers get a shoutout in the docs
- marked tests that OurSQL has problems with (only three), passes 100% now
2009-12-18 20:41:34 +00:00
Mike Bayer 7fe0916aec - merged r6526 from 0.5 branch + some additional formatting fixes, [ticket:1597] 2009-12-06 01:41:13 +00:00
Mike Bayer 55a3e5e30d - subclassed Function off of new FunctionElement generic base
- removed "key" accessor of Function, Grouping - this doesn't seem to be used for anything
- various formatting
- documented the four "Element" classes in the compiler extension as per [ticket:1590]
2009-11-10 00:43:53 +00:00
Mike Bayer ba00071e74 - added a real unit test for sqlsoup
- removed doctest stuff
- redid session docs for sqlsoup
- sqlsoup stays within the transaction of a Session now, is explcitly autocommit=False by default and includes commit()/rollback() methods
- sqlsoup db.<sometable>.update() and delete() now call
query(cls).update() and delete(), respectively.
- sqlsoup now has execute() and connection(), which call upon
the Session methods of those names, ensuring that the bind is
in terms of the SqlSoup object's bind.
2009-11-09 19:41:45 +00:00
Mike Bayer aa557982fa - Added new ENUM type to the Postgresql dialect, which exists as a schema-level
construct and extends the generic Enum type.  Automatically
associates itself with tables and their parent metadata
to issue the appropriate CREATE TYPE/DROP TYPE
commands as needed, supports unicode labels, supports
reflection.  [ticket:1511]

- MySQL ENUM now subclasses the new generic Enum type, and also handles
unicode values implicitly, if the given labelnames are unicode
objects.

- Added a new Enum generic type, currently supported on
Postgresql and MySQL.  Enum is a schema-aware object
to support databases which require specific DDL in
order to use enum or equivalent; in the case of PG
it handles the details of `CREATE TYPE`, and on
other databases without native enum support can
support generation of CHECK constraints.
[ticket:1109] [ticket:1511]

- types documentation updates

- some cleanup on schema/expression docs
2009-10-25 00:40:34 +00:00
Mike Bayer b47f8237d8 export UPPERCASE types as "from sqlalchemy.dialects.<dbname> import VARCHAR, TEXT, INET, ..." 2009-10-10 19:28:18 +00:00
Lele Gaifax 3c1e054251 Fix #1560 revisiting Firebird dialect docs 2009-10-03 13:44:14 +00:00
Philip Jenvey fd22efe297 oracle/mssql+zxjdbc blurb 2009-09-11 23:16:20 +00:00
Mike Bayer 0c26713326 docs 2009-09-10 21:23:04 +00:00
Mike Bayer 57fe160fe7 some doc work 2009-08-10 23:06:07 +00:00
Mike Bayer 8fc5005dfe merge 0.6 series to trunk. 2009-08-06 21:11:27 +00:00
Mike Bayer eeecbb8fc6 updates 2009-07-11 21:07:52 +00:00
Mike Bayer adde312c2a assoc proxy object appends to list automatically [ticket:1351] 2009-06-15 22:39:45 +00:00
Mike Bayer d7e531ce9f - Back-ported the "compiler" extension from SQLA 0.6. This
is a standardized interface which allows the creation of custom
ClauseElement subclasses and compilers.  In particular it's
handy as an alternative to text() when you'd like to
build a construct that has database-specific compilations.
See the extension docs for details.
2009-05-17 22:58:21 +00:00
Michael Trier 0143770384 Corrected duplication of serializer docs. Fixes #1375. 2009-04-09 22:57:16 +00:00
Mike Bayer 0bb1e1b8e3 add collections module to API ref for completeness. links to the mapper documentation
which is less wordy.
2009-03-21 18:03:47 +00:00
Mike Bayer 2cee9cb243 - Added an attribute helper method `set_committed_value` in
sqlalchemy.orm.attributes.  Given an object, attribute name,
and value, will set the value on the object as part of its
"committed" state, i.e. state that is understood to have
been loaded from the database.   Helps with the creation of
homegrown collection loaders and such.
- documented public attributes helper functions.
2009-02-15 20:43:14 +00:00
Mike Bayer 32add82d01 - Can now specify Column objects on subclasses which have no
table of their own (i.e. use single table inheritance).
The columns will be appended to the base table, but only
mapped by the subclass.

- For both joined and single inheriting subclasses, the subclass
will only map those columns which are already mapped on the
superclass and those explicit on the subclass.  Other
columns that are present on the `Table` will be excluded
from the mapping by default, which can be disabled
by passing a blank `exclude_properties` collection to the
`__mapper_args__`.  This is so that single-inheriting
classes which define their own columns are the only classes
to map those columns.   The effect is actually a more organized
mapping than you'd normally get with explicit `mapper()`
calls unless you set up the `exclude_properties` arguments
explicitly.

- docs/tests
2009-01-12 20:36:06 +00:00
Mike Bayer be0c5e4a0b one more typo 2009-01-03 19:37:17 +00:00
Mike Bayer 7e57e282c5 fixed critical errors in assocationproxy docs while we wait for the all new and improved version 2009-01-03 19:35:59 +00:00
Mike Bayer 83a756c541 - Reflected foreign keys will properly locate
their referenced column, even if the column
was given a "key" attribute different from
the reflected name.  This is achieved via a
new flag on ForeignKey/ForeignKeyConstraint
called "link_to_name", if True means the given
name is the referred-to column's name, not its
assigned key.
[ticket:650]
- removed column types from sqlite doc, we
aren't going to list out "implementation" types
since they aren't significant and are less present
in 0.6
- mysql will report on missing reflected foreign
key targets in the same way as other dialects
(we can improve that to be immediate within
reflecttable(), but it should be within
ForeignKeyConstraint()).
- postgres dialect can reflect table with
an include_columns list that doesn't include
one or more primary key columns
2008-12-26 05:28:38 +00:00
Mike Bayer 7933395055 document ConnectionProxy 2008-12-18 00:12:12 +00:00
Mike Bayer 7b7530de19 - sqlite types
- fixed targeting for sqlalchemy.types
2008-12-17 20:53:43 +00:00
Mike Bayer 172781e678 - added sphinx handler to allow __init__ methods through
- sqlite module documentation
- some corrections to pool docs
- the example in URL.translate_connect_args() never made any sense anyway so removed it
2008-12-17 20:12:07 +00:00
Mike Bayer 082d5db64f - removed redundant declarative docs
- cleanup of metadata/foreignkey docs
2008-12-08 20:21:02 +00:00
Mike Bayer 480436ff7c - moved index.rst around to have the API docs right there, no "Main Documentation" chapter which is fairly needless. this all allows PDF to have a decent TOC on the side with only two levels (can we change that ?)
- added LatexFormatter.
- PDF wont work until issue with the docstirng in url.py/URL.translate_connect_args is fixed.
2008-12-07 23:58:02 +00:00
Mike Bayer 058c2895be worked schema into sections 2008-12-07 21:10:27 +00:00
Mike Bayer 9bab01d37b - convert __init__ and :members: to be compatible with autoclass_content='both' 2008-12-07 20:13:26 +00:00
Mike Bayer ee7fcf3110 - re-documented Table and Column constructors, fixed case sensitivity description [ticket:1231]
- turned on autoclass_content="both".  Need to specify __init__ docstring with a newline after the """.
- other docs
2008-12-07 06:30:00 +00:00
Jason Kirtland bdf0117578 Adjusted basis for refs. 2008-12-07 06:26:36 +00:00
Mike Bayer 994ab27aa3 - postgres docstring
- insert/update/delete are documented generatively
- values({}) is no longer deprecated, thus enabling
unicode/Columns as keys
2008-12-06 18:27:04 +00:00
Mike Bayer 1c329624a5 - merged -r5338:5429 of sphinx branch.
- Documentation has been converted to Sphinx.
In particular, the generated API documentation
has been constructed into a full blown
"API Reference" section which organizes
editorial documentation combined with
generated docstrings.   Cross linking between
sections and API docs are vastly improved,
a javascript-powered search feature is
provided, and a full index of all
classes, functions and members is provided.
2008-12-06 16:59:48 +00:00