diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2009-04-07 19:28:02 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2009-04-07 19:28:02 +0200 |
| commit | 55410fc4c2e8163f0e89d14652b267ea5765e30c (patch) | |
| tree | 384a6c0c10e9e25e3b8839ad1897cd505044b6b4 /sqlparse/__init__.py | |
| parent | 534a433f796e7bfc52ceb0bd1bfddf07333f1d46 (diff) | |
| download | sqlparse-55410fc4c2e8163f0e89d14652b267ea5765e30c.tar.gz | |
First version of documentation.
Diffstat (limited to 'sqlparse/__init__.py')
| -rw-r--r-- | sqlparse/__init__.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sqlparse/__init__.py b/sqlparse/__init__.py index 01b3bd8..9a97dc0 100644 --- a/sqlparse/__init__.py +++ b/sqlparse/__init__.py @@ -30,9 +30,7 @@ def parse(sql): *sql* is a single string containting one or more SQL statements. - The returned :class:`~sqlparse.parser.Statement` are fully analyzed. - - Returns a list of :class:`~sqlparse.parser.Statement` instances. + Returns a tuple of :class:`~sqlparse.sql.Statement` instances. """ stack = engine.FilterStack() stack.full_analyze() @@ -42,10 +40,9 @@ def parse(sql): def format(sql, **options): """Format *sql* according to *options*. - Returns a list of :class:`~sqlparse.parse.Statement` instances like - :meth:`parse`, but the statements are formatted according to *options*. + Available options are documented in :ref:`formatting`. - Available options are documented in the :mod:`~sqlparse.format` module. + Returns the formatted SQL statement as string. """ stack = engine.FilterStack() options = formatter.validate_options(options) @@ -55,7 +52,7 @@ def format(sql, **options): def split(sql): - """Split *sql* into separate statements. + """Split *sql* into single statements. Returns a list of strings. """ |
