comparison docs/source/capabilities.rst @ 445:b34ea206c7d1

debug bind var dependence on arg.parsed.expanded
author catherine@Drou
date Tue, 09 Feb 2010 13:48:24 -0500
parents e89db2eaa0b4
children 46589473c36b
comparison
equal deleted inserted replaced
444:e89db2eaa0b4 445:b34ea206c7d1
34 sqlpython commands) with `@/path/to/script.sql` or (for online scripts) 34 sqlpython commands) with `@/path/to/script.sql` or (for online scripts)
35 `@http://scripthost/scriptlibrary/script.sql`. 35 `@http://scripthost/scriptlibrary/script.sql`.
36 36
37 History 37 History
38 ======= 38 =======
39
40 If used on a *nix machine with ``readline`` installed, then ``bash``-like access
41 to the command history is available.
39 42
40 The up- and down-arrow keys allow you to scroll through the lines entered so far 43 The up- and down-arrow keys allow you to scroll through the lines entered so far
41 in your sqlpython session. 44 in your sqlpython session.
42 45
43 Commands are also entered into a command history. 46 Commands are also entered into a command history.
247 from the final row (row numbers begin at 0 for this command). 250 from the final row (row numbers begin at 0 for this command).
248 251
249 When the `autobind` sqlpython parameter is True, a `bind` statement is issued automatically 252 When the `autobind` sqlpython parameter is True, a `bind` statement is issued automatically
250 after every query that returns exactly one row. 253 after every query that returns exactly one row.
251 254
255 Once bind variables are defined, they can be used in SQL statements. The syntax
256 is dependnent on which RDBMS is being queried.
257
258 ---------- ------------------------------------------
259 RDBMS bind variable example
260 ---------- ------------------------------------------
261 Oracle SELECT * FROM party WHERE name = :name;
262 postgreSQL SELECT * FROM party WHERE name = %(name)s;
263 MySQL SELECT * FROM party WHERE name = ;
264 ---------- ------------------------------------------
265
252 Bind variables are available from within Python as a dictionary named `binds` (see Python). 266 Bind variables are available from within Python as a dictionary named `binds` (see Python).
253 267
254 Substitution variables 268 Substitution variables
255 ====================== 269 ======================
256 270