LibreOffice Module dbaccess (master) 1
|
#include <parseschema.hxx>
Public Member Functions | |
SchemaParser (css::uno::Reference< css::embed::XStorage > &rStorage) | |
void | parseSchema () |
Parses table definitions contained by a file called "script" in storage. More... | |
const SqlStatementVector & | getCreateStatements () const |
const SqlStatementVector & | getAlterStatements () const |
std::vector< ColumnDefinition > | getTableColumnTypes (const OUString &sTableName) const |
Returns the column types of a table. More... | |
const std::map< OUString, std::vector< sal_Int32 > > & | getTableIndexes () const |
Returns a vector of indexes for each table. More... | |
const std::map< OUString, std::vector< OUString > > & | getPrimaryKeys () const |
Returns a vector of column names for each table. More... | |
Private Attributes | |
css::uno::Reference< css::embed::XStorage > & | m_rStorage |
std::map< OUString, std::vector< ColumnDefinition > > | m_ColumnTypes |
std::map< OUString, std::vector< sal_Int32 > > | m_Indexes |
std::map< OUString, std::vector< OUString > > | m_PrimaryKeys |
SqlStatementVector | m_sCreateStatements |
SqlStatementVector | m_sAlterStatements |
Definition at line 22 of file parseschema.hxx.
|
explicit |
Definition at line 112 of file parseschema.cxx.
References m_rStorage.
|
inline |
Definition at line 55 of file parseschema.hxx.
References m_sAlterStatements.
|
inline |
Definition at line 50 of file parseschema.hxx.
References m_sCreateStatements.
const std::map< OUString, std::vector< OUString > > & dbahsql::SchemaParser::getPrimaryKeys | ( | ) | const |
Returns a vector of column names for each table.
These columns are the primary keys of the table.
Definition at line 198 of file parseschema.cxx.
References m_PrimaryKeys.
std::vector< ColumnDefinition > dbahsql::SchemaParser::getTableColumnTypes | ( | const OUString & | sTableName | ) | const |
Returns the column types of a table.
It should not be called before calling parseSchema().
sTableName | name of the table. |
Definition at line 181 of file parseschema.cxx.
References m_ColumnTypes, SAL_WARN, dbtools::throwGenericSQLException(), and u.
const std::map< OUString, std::vector< sal_Int32 > > & dbahsql::SchemaParser::getTableIndexes | ( | ) | const |
Returns a vector of indexes for each table.
These indexes are used for locating the data related to the actual table in the binary file.
The indexes point to root elements of AVL trees. Each node of the tree contains one row.
Definition at line 193 of file parseschema.cxx.
References m_Indexes.
void dbahsql::SchemaParser::parseSchema | ( | ) |
Parses table definitions contained by a file called "script" in storage.
Definition at line 117 of file parseschema.cxx.
References dbahsql::FbAlterStmtParser::compose(), dbahsql::FbCreateStmtParser::compose(), dbahsql::utils::convertToUTF8(), dbahsql::CreateStmtParser::getColumnDef(), dbahsql::CreateStmtParser::getForeignParts(), comphelper::getProcessComponentContext(), dbahsql::CreateStmtParser::getTableName(), m_ColumnTypes, m_Indexes, m_rStorage, m_sAlterStatements, m_sCreateStatements, OUStringToOString(), dbahsql::AlterStmtParser::parse(), dbahsql::CreateStmtParser::parse(), SAL_WARN, u, and xStream.
|
private |
Definition at line 28 of file parseschema.hxx.
Referenced by getTableColumnTypes(), and parseSchema().
|
private |
Definition at line 31 of file parseschema.hxx.
Referenced by getTableIndexes(), and parseSchema().
|
private |
Definition at line 34 of file parseschema.hxx.
Referenced by getPrimaryKeys().
|
private |
Definition at line 25 of file parseschema.hxx.
Referenced by parseSchema().
|
private |
Definition at line 37 of file parseschema.hxx.
Referenced by getAlterStatements(), and parseSchema().
|
private |
Definition at line 36 of file parseschema.hxx.
Referenced by getCreateStatements(), and parseSchema().