Commit Graph

49 Commits

Author SHA1 Message Date
Mike Bayer d533b8e922 - The ORM and Core tutorials, which have always been in doctest format,
are now exercised within the normal unit test suite in both Python
2 and Python 3.
- remove the old testdocs.py runner and replace with test/base/test_tutorials.py
- use pytest's unicode fixer so that we can test for unicode strings
in both py2k/3k
- use py3k format overall for prints, exceptions
- add other fixers to guarantee deterministic results
- add skips and ellipses to outputs that aren't worth matching
2015-12-10 17:09:47 -05:00
Mike Bayer 86e5419968 - make inserted_primary_key a link and be more clear what happens here 2015-11-30 11:25:07 -05:00
Mike Bayer c90f0a49f3 - Added support for parameter-ordered SET clauses in an UPDATE
statement.  This feature is available by passing the
:paramref:`~.sqlalchemy.sql.expression.update.preserve_parameter_order`
flag either to the core :class:`.Update` construct or alternatively
adding it to the :paramref:`.Query.update.update_args` dictionary at
the ORM-level, also passing the parameters themselves as a list of 2-tuples.
Thanks to Gorka Eguileor for implementation and tests.
adapted from pullreq github:200
2015-11-28 14:30:05 -05:00
Mike Bayer 4f51fa947f - work to bridge between core/ORM tutorials regarding the text() construct 2015-07-26 16:36:23 -04:00
Mike Bayer 3180f15837 - Organize the tree for 1.1 2015-07-24 18:27:45 -04:00
Mike Bayer cadc2e0ba0 - try to note under insert.values(), if you need
"multiple parameter sets" there is a much more common case
which works equally well for INSERT/UPDATE/DELETE e.g.
executemany().   reference #3476
2015-07-08 20:37:04 -04:00
Mike Bayer 138293c246 - fix typo, fixes #3325 2015-03-17 17:32:16 -04:00
Yuval Langer c86c593ec3 Removing unneeded space. 2014-12-09 04:19:18 +02:00
Mike Bayer 3f1477e2ec - A new series of :class:.Session methods which provide hooks
directly into the unit of work's facility for emitting INSERT
and UPDATE statements has been created.  When used correctly,
this expert-oriented system can allow ORM-mappings to be used
to generate bulk insert and update statements batched into
executemany groups, allowing the statements to proceed at
speeds that rival direct use of the Core.
fixes #3100
2014-12-08 01:10:30 -05:00
Mike Bayer 7c6a45c480 - The :func:~.expression.column and :func:~.expression.table
constructs are now importable from the "from sqlalchemy" namespace,
just like every other Core construct.
- The implicit conversion of strings to :func:`.text` constructs
when passed to most builder methods of :func:`.select` as
well as :class:`.Query` now emits a warning with just the
plain string sent.   The textual conversion still proceeds normally,
however.  The only method that accepts a string without a warning
are the "label reference" methods like order_by(), group_by();
these functions will now at compile time attempt to resolve a single
string argument to a column or label expression present in the
selectable; if none is located, the expression still renders, but
you get the warning again. The rationale here is that the implicit
conversion from string to text is more unexpected than not these days,
and it is better that the user send more direction to the Core / ORM
when passing a raw string as to what direction should be taken.
Core/ORM tutorials have been updated to go more in depth as to how text
is handled.
fixes #2992
2014-09-01 20:19:54 -04:00
Mike Bayer 382f82538b - more updates to text docs, literal_column, column etc. in prep
for ticket 2992.
2014-09-01 17:20:49 -04:00
Mike Bayer 62d81c2ebd - walk back these literal SQL lectures into something much more succinct.
the ORM one in particular was really long winded and I don't really care if people
use text() anyway, they'll figure it out ;)
2014-08-31 20:26:40 -04:00
Mike Bayer 7e417665d2 - start encouraging the use of text() for injection of string-based SQL
rather than straight strings.  reference #2992
2014-08-31 11:45:20 -04:00
Mike Bayer 0932e16cb7 - switch master to be 1.0 2014-05-23 11:18:46 -04:00
Alex Gaynor 1caa7fafbd Fix many typos throughout the codebase
Found using: https://github.com/intgr/topy
2014-04-26 13:13:13 -07:00
Mike Bayer 38519e31b9 seealsos in the tutorial 2014-01-25 16:37:30 -05:00
Mike Bayer fcc7e5b794 - start building out very comprehensive docstrings for core functions 2014-01-25 15:36:09 -05:00
Mike Bayer fd7b951f9d - doc updates, include links to create_engine from tutorials, cleanup
and modernize the engines chapter a bit
2014-01-23 19:38:46 -05:00
Vraj Mohan a62afc6229 Fix cross references 2013-11-17 17:37:55 -05:00
Vraj Mohan 1a6dd8b393 Fix cross references 2013-11-14 17:42:55 -05:00
Mike Bayer 2cf9fc8fd7 - ensure 0.9 in various documentation spaces
- supporting py 2.6, update pypy version, jython not working these days
2013-10-26 16:47:42 -04:00
Mike Bayer 902e013ec1 - add better notes to query.update(), most notably how to deal with a joined table
update, [ticket:2798]
2013-08-18 15:01:59 -04:00
Mike Bayer f76cae4bc9 - rework of correlation, continuing on #2668, #2746
- add support for correlations to propagate all the way in; because
correlations require context now, need to make sure a select enclosure
of any level takes effect any number of levels deep.
- fix what we said correlate_except() was supposed to do when we first
released #2668 - "the FROM clause is left intact if the correlated SELECT
is not used in the context of an enclosing SELECT..." - it was not
considering the "existing_froms" collection at all, and prohibited
additional FROMs from being placed in an any() or has().
- add test for multilevel any()
- lots of docs, including glossary entries as we really need to define
"WHERE clause", "columns clause" etc. so that we can explain correlation better
- based on the insight that a SELECT can correlate anything that ultimately
came from an enclosing SELECT that links to this one via WHERE/columns/HAVING/ORDER BY,
have the compiler keep track of the FROM lists that correspond in this way,
link it to the asfrom flag, so that we send to _get_display_froms() the exact
list of candidate FROMs to correlate.  no longer need any asfrom logic in the
Select() itself
- preserve 0.8.1's behavior for correlation when no correlate options are given, not
to mention 0.7 and prior's behavior of not propagating implicit correlation more than one level..
this is to reduce surprises/hard-to-debug situations when a user isn't trying
to correlate anything.
2013-06-26 13:19:45 -04:00
Tshepang Lekhonkhobe 56ec242999 remove mistakenly-repeated words 2013-03-23 13:42:10 +02:00
Mike Bayer 97d7123674 doc updates 2013-03-11 17:52:41 -04:00
Mike Bayer 522b426a1c - repair doctest for SQL expression tutorial
- remove most use of "whereclause" and "from_obj", not done yet,
part of [ticket:2679]
- add links to method chained versions for all Select.append_XYZ()
calls
- add "method chaining" and "generative" to glossary
2013-03-11 14:44:26 -04:00
Mike Bayer be4b854304 - more docs
- it appears we can get rid of all those "XYZ_toplevel" names and use :doc:.
2012-10-26 20:59:21 -04:00
Mike Bayer d68bf88fa9 - add class_ to AliasedInsp
- redefine inspect(Class.attrname).parent to be always an inspectable
target; either Mapper or AliasedInsp
- add most major features to 08 migration, document, link
2012-10-26 19:25:23 -04:00
Mike Bayer 920b1e91d0 almost obliterate the concept of "implicit execution" from the docs, move it only
to the "engines and connections" chapter nobody reads, put big green "note:"
boxes with the word "discouraged" in them for "bound metadata", "implicit execution",
"threadlocal strategy"
2012-09-09 02:02:01 -04:00
Mike Bayer 515811eb58 - fix the labeled column with column_expression() issue, finishes [ticket:1534]
- epic documentation sweep for new operator system, making ORM links consistent
and complete, full documentation and examples for type/SQL expression feature
- type_coerce() explicitly accepts BindParamClause objects
- change UserDefinedType to coerce the other side to itself by default as this
is much more likely what's desired
- make coerce_compared_type() fully public on all types
- have profiling run the test no matter what so that the test_zoomarks don't fail
when callcounts are missing
2012-08-18 00:54:00 -04:00
Mike Bayer a180239d8e docs for custom ops... 2012-08-16 12:36:13 -04:00
Mike Bayer 8c7914e181 - update engine docstrings due to move
- struggle with Operators class autodoc
2012-08-13 17:35:27 -04:00
Mike Bayer de115ae406 - a big renaming of all the _Underscore classes to have
plain names.  The old names are still defined for
backwards compatibility.
- _BindParamClause renamed to BindParameter
2012-07-17 20:04:22 -04:00
Mike Bayer d8d080a769 Add some Sphinx related version informations paragraph-level markups,
such as ``.. versionaddedd::``, ``.. versionchanged::`` and ``.. deprecated::``.
2012-06-08 15:56:58 -04:00
Mike Bayer 5f10d0d0e4 top level version-specific links 2012-04-24 19:32:30 -04:00
Mike Bayer 68f6951019 fix a whole bunch of note:: / warning:: that were inline,
no longer compatible with docutils 0.8
2011-12-25 17:34:24 -05:00
Mike Bayer 3e98d31d99 fix typo [ticket:2334] 2011-11-26 13:17:21 -05:00
Mike Bayer 6733a9bbdd doc styling rework 2011-11-25 16:17:16 -05:00
Mike Bayer 3acf2ef258 call the simply police 2011-11-22 19:01:21 -05:00
Mike Bayer 90b6ca30e4 - commit the unit tests
- lots of doc updates to all three of update/insert/delete
2011-11-22 17:27:35 -05:00
Mike Bayer 2105032261 some core cross linkage 2011-08-07 19:44:39 -04:00
Mike Bayer b370de69eb another typo 2011-07-05 19:33:05 -04:00
Mike Bayer 7f59f051f9 - fix typo in session section
- rework aliases section
- simplify "transformations", make it separate, dont need to spend time here
- improve linkage
2011-07-05 19:28:05 -04:00
Mike Bayer 4f6f0edd78 a crapload of doc tweaks including [ticket:1666], thanks Toby ! 2011-04-16 12:04:54 -04:00
Mike Bayer 020d6ef8f0 - Added over() function, method to FunctionElement
classes, produces the _Over() construct which
in turn generates "window functions", i.e.
"<window function> OVER (PARTITION BY <partition by>,
ORDER BY <order by>)".
[ticket:1844]
2011-02-10 21:57:44 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer 77763969ff - refer to 0.7 in docs 2010-12-05 13:29:34 -05:00
Mike Bayer 30e4b186f2 doc edits 2010-09-22 23:48:17 -04:00
Mike Bayer 4e24d6cb01 experiment with removing the API section and putting docstrings inline.
new outline section is provided with a new flow.
2010-09-04 13:25:13 -04:00