diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-08-18 13:02:30 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-08-18 13:02:30 -0400 |
commit | 72d10093f40d8fb86cb3df18c7461cfb9ff13d1d (patch) | |
tree | 186b999acba6802316fe709a878710b52be34910 /lib/sqlalchemy/sql/expression.py | |
parent | 1aede1795b5ad88166f90b0486e53755a388fb4b (diff) | |
download | sqlalchemy-72d10093f40d8fb86cb3df18c7461cfb9ff13d1d.tar.gz |
document autocommit when using the compiler extension, update the "understanding autocommit" section
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r-- | lib/sqlalchemy/sql/expression.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index dc8714371..151a321f5 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -4782,7 +4782,9 @@ class Select(_SelectBase): bind = property(bind, _set_bind) class UpdateBase(Executable, ClauseElement): - """Form the base for ``INSERT``, ``UPDATE``, and ``DELETE`` statements.""" + """Form the base for ``INSERT``, ``UPDATE``, and ``DELETE`` statements. + + """ __visit_name__ = 'update_base' @@ -4800,12 +4802,23 @@ class UpdateBase(Executable, ClauseElement): return parameters def params(self, *arg, **kw): + """Set the parameters for the statement. + + This method raises ``NotImplementedError`` on the base class, + and is overridden by :class:`.ValuesBase` to provide the + SET/VALUES clause of UPDATE and INSERT. + + """ raise NotImplementedError( "params() is not supported for INSERT/UPDATE/DELETE statements." " To set the values for an INSERT or UPDATE statement, use" " stmt.values(**parameters).") def bind(self): + """Return a 'bind' linked to this :class:`.UpdateBase` + or a :class:`.Table` associated with it. + + """ return self._bind or self.table.bind def _set_bind(self, bind): |