class toSQLParse

A bunch of functions to parse and indent SQL text. More...

Definition#include <tosqlparse.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Static Methods


Detailed Description

A bunch of functions to parse and indent SQL text.

settings (struct)

settings

statement (class)

statement

Structure the statement is parsed into.

tokenizer (class)

tokenizer

Abstract class to define a source of tokens for the parser.

stringTokenizer (class)

stringTokenizer

Tokenizer class which gets tokens from a string.

editorTokenizer (class)

editorTokenizer

Tokenizer class which gets tokens from an editor.

std::list<statement>  parse (tokenizer &tokens)

parse

[static]

Parse a string.

Parameters:
tokensTokenizer provider to generate parsed tree from.

Returns: Parsed statement tree.

std::list<statement>  parse (tokenizer &tokens,toConnection &conn)

parse

[static]

Parse a string.

Parameters:
tokensTokenizer provider to generate parsed tree from.

Returns: Parsed statement tree.

std::list<statement>  parse (const QString &str)

parse

[static]

Parse a string.

Parameters:
strString to parse.

Returns: Parsed statement tree.

std::list<statement>  parse (const QString &str,toConnection &conn)

parse

[static]

Parse a string.

Parameters:
strString to parse.
connConnection to determine SQL dialect. (For future use)

Returns: Parsed statement tree.

statement  parseStatement (tokenizer &tokens)

parseStatement

[static]

Get one statement (or block) from the root of an editor or string.

Parameters:
tokensTokenizer to get tokens from.
connConnection to determine SQL dialog. (For future use)

statement  parseStatement (const QString &str)

parseStatement

[static]

Get one statement (or block) from the root of an editor or string.

Parameters:
strTokenizer to get tokens from.
connConnection to determine SQL dialog. (For future use)

statement  parseStatement (tokenizer &tokens,toConnection &conn)

parseStatement

[static]

Get one statement (or block) from the root of an editor or string.

Parameters:
tokensTokenizer to get tokens from.
connConnection to determine SQL dialog. (For future use)

statement  parseStatement (const QString &str,toConnection &conn)

parseStatement

[static]

Get one statement (or block) from the root of an editor or string.

Parameters:
strTokenizer to get tokens from.
connConnection to determine SQL dialog. (For future use)

QString  indent (const QString &str)

indent

[static]

Indent a string.

Parameters:
strString to indent.

Returns: An indented string.

QString  indentStatement (statement &stat,int level=0)

indentStatement

[static]

Indent a parse statement structure into a string.

Parameters:
statStatement to indent.
levelInitial indentation level to use.

Returns: A string with the indented statement.

QString  indent (const QString &str,toConnection &conn)

indent

[static]

Indent a string.

Parameters:
strString to indent.
connConnection to determine SQL dialect. (For future use)

Returns: An indented string.

QString  indentString (int level)

indentString

[static]

Create an indentation string.

Parameters:
levelNumber of characters to indent.

int  countIndent (const QString &str,int &chars)

countIndent

[static]

Count indentation level of a string.

Parameters:
strString to check.
charsPosition in string.

settings  getSetting (void)

getSetting

[static]

Get current settings.

void  setSetting (const settings &setting)

setSetting

[static]

Get current settings.