sdkagent

sqlparse API reference

49 public APIs from sqlparse (andialbrecht/sqlparse) — 25 classes, 8 functions, 16 methods. Signatures extracted by static analysis of the actual source.

Repository: andialbrecht/sqlparse

KindCount
Classes25
Functions8
Methods16

API list

classsqlparse.engine.statement_splitter.StatementSplitter
Filter that split stream at individual statements
methodsqlparse.engine.statement_splitter.StatementSplitter.process(stream)
Process the stream
classsqlparse.exceptions.SQLParseError
Base class for exceptions in this module.
funcsqlparse.format(sql:str, encoding:str | None=None, **options:Any) -> str
Format *sql* according to *options*.
funcsqlparse.formatter.build_filter_stack(stack, options)
Setup and return a filter stack.
funcsqlparse.formatter.validate_options(options)
Validates options.
classsqlparse.lexer.Lexer
The Lexer supports configurable syntax.
methodsqlparse.lexer.Lexer.add_keywords(keywords)
Add keyword dictionaries.
methodsqlparse.lexer.Lexer.clear()
Clear all syntax configurations.
methodsqlparse.lexer.Lexer.is_keyword(value)
Checks for a keyword.
funcsqlparse.lexer.tokenize(sql, encoding=None)
Tokenize sql.
funcsqlparse.parse(sql:str, encoding:str | None=None) -> tuple[sql.Statement, ...]
Parse sql and return a list of statements.
funcsqlparse.parsestream(stream:str | IO[str], encoding:str | None=None) -> Generator[sql.Statement, None, None]
Parses sql statements from file-like object.
funcsqlparse.split(sql:str, encoding:str | None=None, strip_semicolon:bool=False) -> list[str]
Split *sql* into single statements.
classsqlparse.sql.Assignment
An assignment like 'var := val;'
classsqlparse.sql.Begin
A BEGIN/END block.
classsqlparse.sql.Case
A CASE statement with one or more WHEN and possibly an ELSE part.
classsqlparse.sql.Command
Grouping of CLI commands.
classsqlparse.sql.Comment
A comment.
classsqlparse.sql.Comparison
A comparison used for example in WHERE clauses.
classsqlparse.sql.For
A 'FOR' loop.
classsqlparse.sql.Function
A function or procedure call.
methodsqlparse.sql.Function.get_parameters()
Return a list of parameters.
methodsqlparse.sql.Function.get_window()
Return the window if it exists.
classsqlparse.sql.Having
A HAVING clause.
classsqlparse.sql.Identifier
Represents an identifier.
classsqlparse.sql.IdentifierList
A list of :class:`~sqlparse.sql.Identifier`'s.
methodsqlparse.sql.IdentifierList.get_identifiers()
Returns the identifiers.
classsqlparse.sql.If
An 'if' clause with possible 'else if' or 'else' parts.
classsqlparse.sql.NameAliasMixin
Implements get_real_name and get_alias.
methodsqlparse.sql.NameAliasMixin.get_alias()
Returns the alias for this identifier or ``None``.
classsqlparse.sql.Operation
Grouping of operations
classsqlparse.sql.Over
An OVER clause.
classsqlparse.sql.Parenthesis
Tokens between parenthesis.
classsqlparse.sql.SquareBrackets
Tokens between square brackets
classsqlparse.sql.Statement
Represents a SQL statement.
methodsqlparse.sql.Statement.get_type()
Returns the type of a statement.
classsqlparse.sql.Token
Base class for all other classes in this module.
methodsqlparse.sql.Token.flatten()
Resolve subgroups.
classsqlparse.sql.TokenList
A group of tokens.
methodsqlparse.sql.TokenList.flatten()
Generator yielding ungrouped tokens.
methodsqlparse.sql.TokenList.get_name()
Returns the name of this identifier.
methodsqlparse.sql.TokenList.insert_after(where, token, skip_ws=True)
Inserts *token* after *where*.
methodsqlparse.sql.TokenList.insert_before(where, token)
Inserts *token* before *where*.
methodsqlparse.sql.TokenList.token_first(skip_ws=True, skip_cm=False)
Returns the first child token.
methodsqlparse.sql.TokenList.token_index(token, start=0)
Return list index of token.
classsqlparse.sql.Values
Grouping of values
classsqlparse.sql.Where
A WHERE clause.
funcsqlparse.utils.consume(iterator, n)
Advance the iterator n-steps ahead.

About this data

These signatures were extracted from the public source of andialbrecht/sqlparse using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries