KanoopDatabaseQt 1.1.1
Qt database abstraction library
Loading...
Searching...
No Matches
SqlParser Class Reference

Parses a multi-statement SQL string into individual SQL statements. More...

#include <sqlparser.h>

Public Member Functions

 SqlParser (const QString &sql)
 Construct a parser and parse the given SQL string into individual statements.
 
QStringList statements () const
 Get the list of parsed SQL statements.
 
bool isValid () const
 Return true if parsing completed successfully.
 

Detailed Description

Parses a multi-statement SQL string into individual SQL statements.

Definition at line 6 of file sqlparser.h.

Constructor & Destructor Documentation

◆ SqlParser()

SqlParser::SqlParser ( const QString &  sql)

Construct a parser and parse the given SQL string into individual statements.

Parameters
sqlThe SQL string potentially containing multiple semicolon-delimited statements.

Member Function Documentation

◆ isValid()

bool SqlParser::isValid ( ) const
inline

Return true if parsing completed successfully.

Returns
true if the SQL was parsed without error.

Definition at line 22 of file sqlparser.h.

◆ statements()

QStringList SqlParser::statements ( ) const
inline

Get the list of parsed SQL statements.

Returns
The list of individual SQL statements.

Definition at line 17 of file sqlparser.h.


The documentation for this class was generated from the following file: